Bug Report
The following file is legal python, as far as I understand it:
import codecs a = codecs.lookup("UTF-8") b = bytes(b"potato") c = a.decode(b, errors="replace")
Running mypy 2.3.1 produces:
$ mypy wibble.py wibble.py:5: error: Unexpected keyword argument "errors" for "__call__" of "_Decoder" [call-arg] wibble.py:5: note: "__call__" defined in "codecs"
To Reproduce
https://mypy-play.net/?mypy=latest&python=latest&gist=e34d60fa6ddb3835c9d2dae7eae7a301
Expected Behavior
I would expect no message at all. Reasoning:
Actual Behavior
False alarm is issued.
Your Environment
It is annotated as positional-only in typeshed, transferring there.
Activity
ilevkivskyi commented on Sep 25, 2026
It is annotated as positional-only in typeshed, transferring there.