We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30512bd commit 86da9b8Copy full SHA for 86da9b8
Lib/test/test_dataclasses/__init__.py
@@ -2579,8 +2579,11 @@ def __init__(self, x: int) -> None:
2579
self.assertFalse(hasattr(E.__init__.__annotate__, "_generated_by_dataclasses"))
2580
2581
def test_init_false_forwardref(self):
2582
- # Currently this raises a NameError even though the ForwardRef
2583
- # is not in the __init__ method
+ # Test forward references in fields not required for __init__ annotations.
+
2584
+ # At the moment this raises a NameError for VALUE annotations even though the
2585
+ # undefined annotation is not required for the __init__ annotations.
2586
+ # Ideally this will be fixed but currently there is no good way to resolve this
2587
2588
@dataclass
2589
class F:
0 commit comments