-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Description
The following code:
s = '%s%s' % (b''.decode(), b'')produces the following output:
$ python3 Test.py
$ mypy --show-column-numbers --pretty --show-error-codes Test.py
Test.py:1:15: error: On Python 3 '%s' % b'abc' produces "b'abc'"; use %r if this is a desired behavior [str-bytes-safe]
s = '%s%s' % (b''.decode(), b'')
^
Found 1 error in 1 file (checked 1 source file)
$ mypy --version
mypy 0.740
$ python3 --version
Python 3.6.8Note that the indicated position of the error in the line is pointing to the first argument (b''.decode()) instead of the seconds one (b'') which is highly misleading.
Metadata
Metadata
Assignees
Labels
No labels