Skip to content

Commit 01349f3

Browse files
committed
removed unnecessary import
1 parent 73fb856 commit 01349f3

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/test_typing_extensions.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8102,12 +8102,11 @@ def test_pep_695_generics_with_future_annotations_nested_in_function(self):
81028102

81038103
class TestEvaluateForwardRefs(BaseTestCase):
81048104
def test_evaluate_forward_refs(self):
8105-
import typing # needed for globals/locals
8106-
from typing import ForwardRef # needed for globals/locals
8105+
from typing import ForwardRef # noqa: F401 # needed for locals
81078106

81088107
minimal_globals = {
81098108
"typing": typing,
8110-
"ForwardRef": ForwardRef,
8109+
"ForwardRef": typing.ForwardRef,
81118110
"typing_extensions": typing_extensions,
81128111
**vars(typing_extensions),
81138112
}
@@ -8151,7 +8150,7 @@ class Y(Generic[T_in_Y]):
81518150
"annotation" : annotation,
81528151
"T": T,
81538152
"T_default": T_default,
8154-
"ForwardRef": ForwardRef,
8153+
"ForwardRef": typing.ForwardRef,
81558154
}
81568155

81578156
cases = {
@@ -8262,7 +8261,7 @@ class Y(Generic[T_in_Y]):
82628261
{
82638262
"skip_if": {"localns": True, "format": Format.FORWARDREF},
82648263
Format.VALUE: X,
8265-
Format.FORWARDREF: ForwardRef("Y.a"),
8264+
Format.FORWARDREF: typing.ForwardRef("Y.a"),
82668265
Format.STRING: "Y.a",
82678266
},
82688267
],
@@ -8302,14 +8301,14 @@ class Y(Generic[T_in_Y]):
83028301
"owner": None,
83038302
"type_params": None,
83048303
Format.VALUE: NameError,
8305-
Format.FORWARDREF: ForwardRef("T_in_Y"),
8304+
Format.FORWARDREF: typing.ForwardRef("T_in_Y"),
83068305
Format.STRING: "T_in_Y",
83078306
},
83088307
{
83098308
"owner": Y,
83108309
"type_params": None,
83118310
Format.VALUE: NameError,
8312-
Format.FORWARDREF: ForwardRef("T_in_Y"),
8311+
Format.FORWARDREF: typing.ForwardRef("T_in_Y"),
83138312
Format.STRING: "T_in_Y",
83148313
},
83158314
{
@@ -8330,7 +8329,7 @@ class Y(Generic[T_in_Y]):
83308329
"owner": X,
83318330
"type_params": None,
83328331
Format.VALUE: NameError,
8333-
Format.FORWARDREF: ForwardRef("T_in_Y"),
8332+
Format.FORWARDREF: typing.ForwardRef("T_in_Y"),
83348333
Format.STRING: "T_in_Y",
83358334
},
83368335
],

0 commit comments

Comments
 (0)