Skip to content

Commit

Permalink
[FIX] Issue with Optional parameters that are inherited (#222)
Browse files Browse the repository at this point in the history
* fixed issue with inheritance of Optional classes with the new lazy base classes

* linted
  • Loading branch information
ncilfone committed Feb 18, 2022
1 parent e59179d commit a07c209
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spock/backend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ def _base_attr(cls, kw_only, make_init, dynamic):
{attribute.name: attribute.metadata["og_type"]}
)
else:
base_annotation.update({attribute.name: attribute.type})
base_annotation.update(
{attribute.name: val.__annotations__[attribute.name]}
)
base_defaults = {
attribute.name: attribute.default
for val in bases
Expand Down

0 comments on commit a07c209

Please sign in to comment.