Skip to content

Commit 3a8407e

Browse files
committed
stub check update
1 parent b0b25b3 commit 3a8407e

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

mypy/nativeparse.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
read_str as read_str_bare,
3030
)
3131

32-
from mypy import defaults, message_registry, nodes, types
32+
from mypy import message_registry, nodes, types
3333
from mypy.cache import (
3434
DICT_STR_GEN,
3535
END_TAG,
@@ -190,10 +190,8 @@ def check_min_version(
190190
) -> None:
191191
"""Report a non blocker syntax error if the target Python feature is older than min_version."""
192192
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:
193+
return
194+
if self.options.python_version < min_version:
197195
self.add_error(
198196
f"{feature} are only supported in Python "
199197
f"{min_version[0]}.{min_version[1]} and greater",

0 commit comments

Comments
 (0)