File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed
hypothesis-python/src/hypothesis Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 2525from itertools import chain
2626from random import Random
2727from typing import (
28+ TYPE_CHECKING ,
2829 Any ,
2930 BinaryIO ,
3031 Callable ,
114115
115116if sys .version_info >= (3 , 10 ): # pragma: no cover
116117 from types import EllipsisType as InferType
117-
118+ elif TYPE_CHECKING :
119+ from builtins import ellipsis as InferType
118120else :
119121 InferType = type (Ellipsis )
120122
Original file line number Diff line number Diff line change 1212import unittest
1313from functools import partial
1414from inspect import Parameter , signature
15- from typing import Optional , Type , Union
15+ from typing import TYPE_CHECKING , Optional , Type , Union
1616
1717from django import forms as df , test as dt
1818from django .contrib .staticfiles import testing as dst
2828
2929if sys .version_info >= (3 , 10 ): # pragma: no cover
3030 from types import EllipsisType as InferType
31-
31+ elif TYPE_CHECKING :
32+ from builtins import ellipsis as InferType
3233else :
3334 InferType = type (Ellipsis )
3435
Original file line number Diff line number Diff line change 8383from string import ascii_lowercase
8484from textwrap import dedent , indent
8585from typing import (
86+ TYPE_CHECKING ,
8687 Any ,
8788 Callable ,
8889 Dict ,
119120
120121if sys .version_info >= (3 , 10 ): # pragma: no cover
121122 from types import EllipsisType as InferType
122-
123+ elif TYPE_CHECKING :
124+ from builtins import ellipsis as InferType
123125else :
124126 InferType = type (Ellipsis )
125127
Original file line number Diff line number Diff line change 109109
110110if sys .version_info >= (3 , 10 ): # pragma: no cover
111111 from types import EllipsisType as InferType
112-
112+ elif typing .TYPE_CHECKING :
113+ from builtins import ellipsis as InferType
113114else :
114115 InferType = type (Ellipsis )
115116
You can’t perform that action at this time.
0 commit comments