Skip to content

Commit 69568f8

Browse files
committed
fix: Add future annotations to prevent NameError with TYPE_CHECKING imports
Add 'from __future__ import annotations' to defer annotation evaluation, preventing NameError when Context type is only imported under TYPE_CHECKING.
1 parent ff05ea9 commit 69568f8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

features/environment.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
the BDD test execution lifecycle.
55
"""
66

7+
from __future__ import annotations
8+
79
from typing import TYPE_CHECKING
810

911
if TYPE_CHECKING:

features/steps/setup_steps.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""Step definitions for project setup verification."""
22

3+
from __future__ import annotations
4+
35
from typing import TYPE_CHECKING, Any
46

57
from behave import given, then, when

0 commit comments

Comments
 (0)