Skip to content

Commit

Permalink
Updated black version
Browse files Browse the repository at this point in the history
  • Loading branch information
maximusunc committed Apr 4, 2024
1 parent ee11db2 commit e4f60ed
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
8 changes: 3 additions & 5 deletions strider/throttle.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,9 @@ async def process_batch(
response_values[request_id] = ReasonerResponse(
message=Message()
)
response_values[
request_id
].message.query_graph = request_value_mapping[
request_id
].message.query_graph.copy()
response_values[request_id].message.query_graph = (
request_value_mapping[request_id].message.query_graph.copy()
)
response_values[request_id].message.knowledge_graph = (
message.knowledge_graph
or KnowledgeGraph(nodes={}, edges={})
Expand Down
24 changes: 12 additions & 12 deletions strider/trapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,15 @@ def filter_message(
support_graph_id
]
for edge_id in message.auxiliary_graphs[support_graph_id].edges:
kept_knowledge_graph.edges[
edge_id
] = message.knowledge_graph.edges[edge_id]
kept_knowledge_graph.edges[edge_id] = (
message.knowledge_graph.edges[edge_id]
)
# add edges from result
for edge_bindings in analysis.edge_bindings.values():
for edge_binding in edge_bindings:
kept_knowledge_graph.edges[
edge_binding.id
] = message.knowledge_graph.edges[edge_binding.id]
kept_knowledge_graph.edges[edge_binding.id] = (
message.knowledge_graph.edges[edge_binding.id]
)
# add support graphs from edge
for attribute in (
kept_knowledge_graph.edges[edge_binding.id].attributes
Expand All @@ -314,15 +314,15 @@ def filter_message(
== "biolink:support_graphs"
):
for aux_graph_id in attribute.value:
kept_aux_graphs[
aux_graph_id
] = message.auxiliary_graphs[aux_graph_id]
kept_aux_graphs[aux_graph_id] = (
message.auxiliary_graphs[aux_graph_id]
)
for edge_id in message.auxiliary_graphs[
aux_graph_id
].edges:
kept_knowledge_graph.edges[
edge_id
] = message.knowledge_graph.edges[edge_id]
kept_knowledge_graph.edges[edge_id] = (
message.knowledge_graph.edges[edge_id]
)
# keep any results that don't have promiscuous nodes
# only add result if all the knowledge and aux graph stuff worked out
kept_results.append(result)
Expand Down

0 comments on commit e4f60ed

Please sign in to comment.