File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88from __future__ import annotations
99
1010from collections .abc import Mapping
11- from typing import TYPE_CHECKING , Any , ClassVar , Iterable
12- import sys
13-
14- # doing these imports with `try ... except ImportError` doesn't pass mypy
15- # checking because mypy sees `typing._SpecialForm` and
16- # `typing_extensions._SpecialForm` as incompatible
17- #
18- # see:
19- # https://mypy.readthedocs.io/en/stable/runtime_troubles.html#using-new-additions-to-the-typing-module
20- # https://github.com/python/mypy/issues/4427
21- if sys .version_info >= (3 , 8 ):
22- from typing import Protocol , runtime_checkable
23- else :
24- from typing_extensions import Protocol , runtime_checkable
11+ from typing import (
12+ TYPE_CHECKING ,
13+ Any ,
14+ ClassVar ,
15+ Iterable ,
16+ Protocol ,
17+ runtime_checkable ,
18+ )
2519
2620# in order for Sphinx to resolve references accurately from type annotations,
2721# it needs to see names like `jsonschema.TypeChecker`
You can’t perform that action at this time.
0 commit comments