Method: pylint.extensions.typing.TypingChecker.open
Calls: 24, Exceptions: 0, Paths: 3Back
Path 1: 14 calls (0.58)
1def open(self) -> None:
2 py_version = self.linter.config.py_version
3 self._py37_plus = py_version >= (3, 7)
4 self._py39_plus = py_version >= (3, 9)
5 self._py310_plus = py_version >= (3, 10)
6
7 self._should_check_typing_alias = self._py39_plus or (
8 self._py37_plus and self.linter.config.runtime_typing is False
9 )
10 self._should_check_alternative_union_syntax = self._py310_plus or (
11 self._py37_plus and self.linter.config.runtime_typing is False
12 )
13
14 self._should_check_noreturn = py_version < (3, 7, 2)
15 self._should_check_callable = py_version < (3, 9, 2)
Path 2: 6 calls (0.25)
1def open(self) -> None:
2 py_version = self.linter.config.py_version
3 self._py37_plus = py_version >= (3, 7)
4 self._py39_plus = py_version >= (3, 9)
5 self._py310_plus = py_version >= (3, 10)
6
7 self._should_check_typing_alias = self._py39_plus or (
8 self._py37_plus and self.linter.config.runtime_typing is False
9 )
10 self._should_check_alternative_union_syntax = self._py310_plus or (
11 self._py37_plus and self.linter.config.runtime_typing is False
12 )
13
14 self._should_check_noreturn = py_version < (3, 7, 2)
15 self._should_check_callable = py_version < (3, 9, 2)
Path 3: 4 calls (0.17)
1def open(self) -> None:
2 py_version = self.linter.config.py_version
3 self._py37_plus = py_version >= (3, 7)
4 self._py39_plus = py_version >= (3, 9)
5 self._py310_plus = py_version >= (3, 10)
6
7 self._should_check_typing_alias = self._py39_plus or (
8 self._py37_plus and self.linter.config.runtime_typing is False
9 )
10 self._should_check_alternative_union_syntax = self._py310_plus or (
11 self._py37_plus and self.linter.config.runtime_typing is False
12 )
13
14 self._should_check_noreturn = py_version < (3, 7, 2)
15 self._should_check_callable = py_version < (3, 9, 2)