Skip to content

Commit

Permalink
Add changelog entry
Browse files Browse the repository at this point in the history
  • Loading branch information
isidentical committed Dec 28, 2020
1 parent fb8fc98 commit 10db2e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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?
===========================
Expand Down
3 changes: 2 additions & 1 deletion pylint/checkers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
for name in methods # type: ignore
}
PYMETHODS = set(SPECIAL_METHODS_PARAMS)
PY310_PLUS = sys.version_info[:2] >= (3, 10)


class NoSuchArgumentError(Exception):
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 10db2e4

Please sign in to comment.