Thanks to visit codestin.com Credit goes to github.com
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 ed57b36 commit 1de6015Copy full SHA for 1de6015
1 file changed
Lib/test/test_typing.py
@@ -3177,6 +3177,12 @@ def test_get_type_hints_classes(self):
3177
'my_inner_a2': mod_generics_cache.B.A,
3178
'my_outer_a': mod_generics_cache.A})
3179
3180
+ def test_get_type_hints_classes_no_implicit_optional(self):
3181
+ class WithNoneDefault:
3182
+ field: int = None # most type-checkers won't be happy with it
3183
+
3184
+ self.assertEqual(gth(WithNoneDefault), {'field': int})
3185
3186
def test_respect_no_type_check(self):
3187
@no_type_check
3188
class NoTpCheck:
0 commit comments