codecs._Decoder
is incorrectly annotated as taking input: bytes
, while at runtime it receives memoryview
#10656
Labels
stubs: false positive
Type checkers report false errors
How to check runtime bevahiour:
When i run this code,
decode
prints<class 'memoryview'>
, which is inconsistent withcodecs._Decoder
annotation.Annotating
input
asmemoryview
doesnt help, becausecodecs.CodecInfo
accepts only function that takesinput
arg of typebytes
.The text was updated successfully, but these errors were encountered: