-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
The following code:
from typing import Sequence
t: Sequence[str] = ('A', 'B')
print("%s %s" % t)produces the following output:
$ python3 Test.py
A B
$ mypy Test.py
Test.py:4: error: Not enough arguments for format string
Found 1 error in 1 file (checked 1 source file)
$ mypy --version
mypy 0.740
$ python3 --version
Python 3.6.8I understand that this case cannot be fully resolved, but my concern is about the error message, which is misleading.
Probably it should be something like Can't determine if the number of arguments for format string is correct instead.
Or maybe no error should be issued at all to avoid false positives.
Or maybe an additional configuration option may be introduced to regulate whether an error should be issued in cases like this one.