Skip to content
This repository was archived by the owner on Feb 24, 2021. It is now read-only.

Commit 6c7d06f

Browse files
authored
Maybe this fixes #27?
1 parent cef5849 commit 6c7d06f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/structured_data/_annotations.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Helper functions for processing annotations."""
22

3+
import inspect
34
import sys
45
import typing
56

@@ -29,7 +30,7 @@ def product_args_from_annotations(cls: type) -> typing.Dict[str, typing.Any]:
2930
for superclass, key, value in _all_annotations(cls):
3031
if value == "None" or _ctor.annotation_is_classvar(
3132
value, vars(sys.modules[superclass.__module__])
32-
):
33+
) or inspect.isdatadescriptor(inspect.getattr_static(cls, key)):
3334
value = None
3435
_nillable_write.nillable_write(args, key, value)
3536
return args

0 commit comments

Comments
 (0)