We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c74b3c6 commit ffdf86bCopy full SHA for ffdf86b
src/adaptix/_internal/type_tools/fwd_ref.py
@@ -11,6 +11,8 @@ def _get_caller_module(stack_offset: int):
11
12
for _ in range(stack_offset):
13
frame = frame.f_back
14
+ if frame is None:
15
+ raise RuntimeError("Unexpected end of call stack")
16
return sys.modules[frame.f_globals["__name__"]]
17
18
tests/unit/model_tools/introspection/test_namedtuple.py
@@ -356,6 +356,7 @@ def test_rename():
356
)
357
358
359
+
360
@requires(MAX_PY_314)
361
def test_class_hinted_namedtuple():
362
BarA = NamedTuple("BarA", a=int, b=str)
0 commit comments