File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change 8
8
from __future__ import annotations
9
9
10
10
from 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
+ )
25
19
26
20
# in order for Sphinx to resolve references accurately from type annotations,
27
21
# it needs to see names like `jsonschema.TypeChecker`
You can’t perform that action at this time.
0 commit comments