Skip to content

Commit 520ef39

Browse files
author
Michael Fritzsche
committed
improved flake8 rating
1 parent 7cfa7bc commit 520ef39

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/hermes/model/merge/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# SPDX-FileCopyrightText: 2022 German Aerospace Center (DLR)
22
#
3-
# SPDX-License-Identifier: Apache-2.0
3+
# SPDX-License-Identifier: Apache-2.0

src/hermes/model/types/ld_container.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)