Skip to content

Commit

Permalink
Merge pull request #113 from opossum-tool/dependabot/pip/black-24.1.0
Browse files Browse the repository at this point in the history
Bump black from 23.12.1 to 24.1.0
  • Loading branch information
meretp authored Jan 30, 2024
2 parents 9fdac98 + c7513d9 commit f8dfc35
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
48 changes: 24 additions & 24 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pre-commit = "^3.5.0"
pytest = "^7.4.4"

[tool.poetry.group.dev.dependencies]
black = "^23.12.1"
black = "^24.1.0"
isort = "^5.13.2"
flake8 = "^7.0.0"
mypy = "^1.8.0"
Expand Down
8 changes: 4 additions & 4 deletions src/opossum_lib/file_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ def generate_json_file_from_tree(tree: DiGraph) -> OpossumInformation:
)
for node in connected_subgraph.nodes():
path: List[str] = shortest_path(connected_subgraph, source, node)
path_with_labels: List[
Tuple[str, ResourceType]
] = _replace_node_ids_with_labels_and_add_resource_type(
path, connected_subgraph
path_with_labels: List[Tuple[str, ResourceType]] = (
_replace_node_ids_with_labels_and_add_resource_type(
path, connected_subgraph
)
)
resources = resources.add_path(path_with_labels)
file_path: str = _create_file_path_from_graph_path(path, connected_subgraph)
Expand Down
6 changes: 3 additions & 3 deletions src/opossum_lib/graph_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def generate_graph_from_spdx(document: Document) -> DiGraph:

def _create_label_for_node(graph: DiGraph, node: str) -> str:
if _node_represents_a_spdx_element(graph, node):
element_node: Optional[
Union[CreationInfo, File, Package, Snippet]
] = graph.nodes[node]["element"]
element_node: Optional[Union[CreationInfo, File, Package, Snippet]] = (
graph.nodes[node]["element"]
)
if element_node:
return element_node.name or element_node.spdx_id
else:
Expand Down

0 comments on commit f8dfc35

Please sign in to comment.