We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0b25b3 commit 3a8407eCopy full SHA for 3a8407e
1 file changed
mypy/nativeparse.py
@@ -29,7 +29,7 @@
29
read_str as read_str_bare,
30
)
31
32
-from mypy import defaults, message_registry, nodes, types
+from mypy import message_registry, nodes, types
33
from mypy.cache import (
34
DICT_STR_GEN,
35
END_TAG,
@@ -190,10 +190,8 @@ def check_min_version(
190
) -> None:
191
"""Report a non blocker syntax error if the target Python feature is older than min_version."""
192
if self.is_stub:
193
- target = max(self.options.python_version, defaults.PYTHON3_VERSION)
194
- else:
195
- target = self.options.python_version
196
- if target < min_version:
+ return
+ if self.options.python_version < min_version:
197
self.add_error(
198
f"{feature} are only supported in Python "
199
f"{min_version[0]}.{min_version[1]} and greater",
0 commit comments