From 4a6cd1b7162759d816d9d3ddd4b973072f769af8 Mon Sep 17 00:00:00 2001 From: Arne Boockmeyer Date: Mon, 24 Jun 2024 14:37:08 +0200 Subject: [PATCH] lint with blake --- test/topology_test.py | 4 +++- yaramo/topology.py | 11 +++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test/topology_test.py b/test/topology_test.py index 82ab170..cc75956 100644 --- a/test/topology_test.py +++ b/test/topology_test.py @@ -1,5 +1,6 @@ from yaramo.model import Edge, Node, Topology + def test_get_edge_by_nodes(): topology = Topology() @@ -23,6 +24,7 @@ def _test_edge(_node_a, _node_b, _expected_edge): _test_edge(node_b, node_a, edge) _test_edge(node_a, node_c, None) + def test_json_export_and_import(): topology = Topology() @@ -39,4 +41,4 @@ def test_json_export_and_import(): assert len(topology.nodes) == len(topology_copy.nodes) assert len(topology.edges) == len(topology_copy.edges) assert len(topology.signals) == len(topology_copy.signals) - assert len(topology.routes) == len(topology_copy.routes) \ No newline at end of file + assert len(topology.routes) == len(topology_copy.routes) diff --git a/yaramo/topology.py b/yaramo/topology.py index 08547cc..248d109 100644 --- a/yaramo/topology.py +++ b/yaramo/topology.py @@ -90,14 +90,13 @@ def from_json(cls, json_str: str): if "geo_node" in node and node["geo_node"] is not None: geo_node = obj["objects"][node["geo_node"]] geo_node_obj = Wgs84GeoNode( - obj["objects"][geo_node["geo_point"]]["x"], - obj["objects"][geo_node["geo_point"]]["y"], - name=geo_node["name"], - uuid=geo_node["uuid"], - ) + obj["objects"][geo_node["geo_point"]]["x"], + obj["objects"][geo_node["geo_point"]]["y"], + name=geo_node["name"], + uuid=geo_node["uuid"], + ) node_obj.geo_node = geo_node_obj - for signal in obj["signals"]: topology.add_signal(Signal(**signal)) for edge in obj["edges"]: