-
Notifications
You must be signed in to change notification settings - Fork 155
Closed
Labels
bugSomething that should work but isn't, with an example and a test case.Something that should work but isn't, with an example and a test case.
Description
Describe the bug
When an empty MappingSet object is initialized for e.g.: test = MappingSet(mapping_set_id = "x", license = "v") the resultant test object looks like this:
MappingSet
(
mapping_set_id='x',
license='v',
mappings={}, # ***Should be empty list ****
mapping_set_version=None, mapping_set_source=[], mapping_set_description=None,
creator_id=[], creator_label=[], subject_source=None, subject_source_version=None,
object_source=None, object_source_version=None, mapping_provider=None,
mapping_tool=None, mapping_date=None, subject_match_field=[],
object_match_field=[], subject_preprocessing=[], object_preprocessing=[],
match_term_type=None, see_also=[], other=None, comment=None
)
The 'mappings' initialization in the MappingSet class is as follows:
mappings: Optional[
Union[Union[dict, "Mapping"], List[Union[dict, "Mapping"]]]
] = empty_list()
So an empty list is expected but in the example above , we see that the mappings object is an empty dictionary.
To Reproduce
Mentioned above.
Expected behavior
mappings = Empty List
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething that should work but isn't, with an example and a test case.Something that should work but isn't, with an example and a test case.