File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# SPDX-FileCopyrightText: 2022 German Aerospace Center (DLR)
22#
3- # SPDX-License-Identifier: Apache-2.0
3+ # SPDX-License-Identifier: Apache-2.0
Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ def _to_expanded_json(
237237 # while searching build a path such that it leads from the found ld_dicts ld_value to selfs data_dict/ item_list
238238 parent = self
239239 path = []
240- while not "ld_dict" in [sub_cls .__name__ for sub_cls in type (parent ).mro ()]:
240+ while "ld_dict" not in [sub_cls .__name__ for sub_cls in type (parent ).mro ()]:
241241 if parent .container_type == "@list" :
242242 path .extend (["@list" , 0 ])
243243 elif parent .container_type == "@graph" :
@@ -250,7 +250,7 @@ def _to_expanded_json(
250250 # if neither self nor any of its parents is a ld_dict:
251251 # create a dict with the key of the outer most parent of self and this parents ld_value as a value
252252 # this dict is stored in an ld_container and simulates the most minimal JSON-LD object possible
253- if not "ld_dict" in [sub_cls .__name__ for sub_cls in type (parent ).mro ()]:
253+ if "ld_dict" not in [sub_cls .__name__ for sub_cls in type (parent ).mro ()]:
254254 key = self .ld_proc .expand_iri (parent .active_ctx , parent .key )
255255 parent = ld_container ([{key : parent ._data }])
256256 path .append (0 )
You can’t perform that action at this time.
0 commit comments