Skip to content

Commit 30cc7e7

Browse files
committed
fixup! typing: get_parametrized_fixture_keys, Session._fixturemanager
1 parent 028d3c3 commit 30cc7e7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/_pytest/fixtures.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ def get_parametrized_fixture_keys(
203203
cs = item.callspec # type: ignore[attr-defined]
204204
except AttributeError:
205205
return
206-
assert isinstance(item, Function)
206+
if TYPE_CHECKING:
207+
assert isinstance(item, Function)
207208

208209
# cs.indices.items() is random order of argnames. Need to
209210
# sort this so that different calls to

src/_pytest/python.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from textwrap import dedent
1313
from typing import Dict
1414
from typing import List
15+
from typing import Optional
1516
from typing import Tuple
1617

1718
import py

0 commit comments

Comments
 (0)