We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 580e136 commit 09365a7Copy full SHA for 09365a7
ghapp/ghapp/cattrs.py
@@ -51,7 +51,7 @@ def _register_ignore_optional_none(cls, converter=None):
51
prev_unstructure = converter._unstructure_func.dispatch(cls)
52
optional_attrs = {
53
f.name for f in attr.fields(cls)
54
- if isinstance(f.type, typing.Union) and type(None) in f.type.__args__
+ if isinstance(f.type, typing._GenericAlias) and type(None) in f.type.__args__
55
}
56
57
def unstructure_ignoring_optional_none(obj):
0 commit comments