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.
Optional
1 parent 6f9ca53 commit a468866Copy full SHA for a468866
1 file changed
Lib/test/test_typing.py
@@ -3104,6 +3104,12 @@ def test_get_type_hints_classes(self):
3104
'my_inner_a2': mod_generics_cache.B.A,
3105
'my_outer_a': mod_generics_cache.A})
3106
3107
+ def test_get_type_hints_classes_no_implicit_optional(self):
3108
+ class WithNoneDefault:
3109
+ field: int = None # most type-checkers won't be happy with it
3110
+
3111
+ self.assertEqual(gth(WithNoneDefault), {'field': int})
3112
3113
def test_respect_no_type_check(self):
3114
@no_type_check
3115
class NoTpCheck:
0 commit comments