diff options
Diffstat (limited to 'astroid/nodes/scoped_nodes/scoped_nodes.py')
-rw-r--r-- | astroid/nodes/scoped_nodes/scoped_nodes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/astroid/nodes/scoped_nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes/scoped_nodes.py index 771f93f3..ef25c2b7 100644 --- a/astroid/nodes/scoped_nodes/scoped_nodes.py +++ b/astroid/nodes/scoped_nodes/scoped_nodes.py @@ -19,7 +19,7 @@ from functools import cached_property, lru_cache from typing import TYPE_CHECKING, ClassVar, Literal, NoReturn, TypeVar, overload from astroid import bases, util -from astroid.const import IS_PYPY, PY38, PY38_PLUS, PY39_PLUS, PYPY_7_3_11_PLUS +from astroid.const import IS_PYPY, PY38, PY39_PLUS, PYPY_7_3_11_PLUS from astroid.context import ( CallContext, InferenceContext, @@ -2000,7 +2000,7 @@ class ClassDef( Can also return 0 if the line can not be determined. """ - if not PY38_PLUS or IS_PYPY and PY38 and not PYPY_7_3_11_PLUS: + if IS_PYPY and PY38 and not PYPY_7_3_11_PLUS: # For Python < 3.8 the lineno is the line number of the first decorator. # We want the class statement lineno. Similar to 'FunctionDef.fromlineno' # PyPy (3.8): Fixed with version v7.3.11 |