Skip to content

The static function from_dict(...) of class NavigableDict doesn't return the proper type when subclassed #41

@rhuygen

Description

@rhuygen

NavigableDict is a class that should be designed for subclassing. Nevertheless, when using the static method from_dict(...) you would expect this method to return a class of the same type as the subclass. Instead, it returns a NavigableDict.

from egse.setup import Setup
x = Setup.from_dict({})
print(type(x))
<class 'navdict.navdict.NavigableDict'>

The expected behavior would be:

from egse.setup import Setup
x = Setup.from_dict({})
print(type(x))
<class 'egse.setup.Setup'>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions