Skip to content

Commit b46cd09

Browse files
committed
Fix some code review comments
1 parent 5d6a493 commit b46cd09

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pylint/checkers/typecheck.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from re import Pattern
2121
from typing import TYPE_CHECKING, Any, Union
2222

23+
import astroid
2324
import astroid.exceptions
2425
import astroid.helpers
2526
from astroid import bases, nodes
@@ -1902,12 +1903,12 @@ def _detect_unsupported_alternative_union_syntax(self, node: nodes.BinOp) -> Non
19021903
if not allowed_nested_syntax:
19031904
self._check_unsupported_alternative_union_syntax(node)
19041905

1905-
def _includes_version_compatible_overload(self, attrs: list[nodes.NodeNG]):
1906+
def _includes_version_compatible_overload(self, attrs: list):
19061907
"""Check if a set of overloads of an operator includes one that
19071908
can be relied upon for our configured Python version.
19081909
19091910
If we are running under a Python 3.10+ runtime but configured for
1910-
pre-3.10 compatibility then Astroid will ahve inferred the
1911+
pre-3.10 compatibility then Astroid will have inferred the
19111912
existence of __or__ / __ror__ on builtins.type, but these aren't
19121913
available in the configured version of Python.
19131914
"""
@@ -1916,7 +1917,7 @@ def _includes_version_compatible_overload(self, attrs: list[nodes.NodeNG]):
19161917
and attr.parent.qname() == "builtins.type"
19171918
for attr in attrs
19181919
)
1919-
return (not is_py310_builtin) or self._py310_plus
1920+
return not is_py310_builtin or self._py310_plus
19201921

19211922
def _check_unsupported_alternative_union_syntax(self, node: nodes.BinOp) -> None:
19221923
"""Check if left or right node is of type `type`.

0 commit comments

Comments
 (0)