diff options
author | Marc Mueller <30130371+cdce8p@users.noreply.github.com> | 2021-04-23 20:29:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-23 20:29:52 +0200 |
commit | 81c7c50ad0273e2027f636edbddba9d410c8319a (patch) | |
tree | 29a8f6fda0499e8df2895c76050fba46f65afed6 | |
parent | 95c05e024cf4d74fa25ee1a8cbcc5e08ebc1407f (diff) | |
download | pylint-git-81c7c50ad0273e2027f636edbddba9d410c8319a.tar.gz |
Don't auto-enable postponed evaluation of type annotations with PY310 (#4385)
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | pylint/checkers/utils.py | 5 |
2 files changed, 2 insertions, 5 deletions
@@ -43,6 +43,8 @@ Release date: Undefined Closes #3406 +* Don't auto-enable postponed evaluation of type annotations with Python 3.10 + What's New in Pylint 2.7.5? =========================== diff --git a/pylint/checkers/utils.py b/pylint/checkers/utils.py index edbc4b489..86a65c6da 100644 --- a/pylint/checkers/utils.py +++ b/pylint/checkers/utils.py @@ -70,8 +70,6 @@ from typing import ( import _string import astroid -from pylint.constants import PY310_PLUS - BUILTINS_NAME = builtins.__name__ COMP_NODE_TYPES = ( astroid.ListComp, @@ -1328,9 +1326,6 @@ def get_node_last_lineno(node: astroid.node_classes.NodeNG) -> int: def is_postponed_evaluation_enabled(node: astroid.node_classes.NodeNG) -> bool: """Check if the postponed evaluation of annotations is enabled""" - if PY310_PLUS: - return True - module = node.root() return "annotations" in module.future_imports |