diff options
author | Batuhan Taskaya <batuhanosmantaskaya@gmail.com> | 2020-12-28 12:42:53 +0300 |
---|---|---|
committer | Batuhan Taskaya <batuhanosmantaskaya@gmail.com> | 2020-12-28 12:42:53 +0300 |
commit | 10db2e4018a88c418d0e39ff7824414dea4af8c3 (patch) | |
tree | 3f72c850d9193c1231815cce4053ee5ee5baa72c | |
parent | fb8fc98984850819babed1ca15e0f873f52e66ab (diff) | |
download | pylint-git-10db2e4018a88c418d0e39ff7824414dea4af8c3.tar.gz |
Add changelog entry
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | pylint/checkers/utils.py | 3 |
2 files changed, 6 insertions, 1 deletions
@@ -19,6 +19,10 @@ Pylint's ChangeLog * Add missing checks for deprecated functions. +* Postponed evaluation of annotations are now recognized by default if python version is above 3.10 + + Closes #3992 + What's New in Pylint 2.6.1? =========================== diff --git a/pylint/checkers/utils.py b/pylint/checkers/utils.py index ed2c2a5a9..6c707e10f 100644 --- a/pylint/checkers/utils.py +++ b/pylint/checkers/utils.py @@ -213,6 +213,7 @@ SPECIAL_METHODS_PARAMS = { for name in methods # type: ignore } PYMETHODS = set(SPECIAL_METHODS_PARAMS) +PY310_PLUS = sys.version_info[:2] >= (3, 10) class NoSuchArgumentError(Exception): @@ -1265,7 +1266,7 @@ 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 sys.version_info[:2] >= (3, 10): + if PY310_PLUS: return True module = node.root() |