Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jeandut committed Jan 17, 2025
1 parent 8a8c9ab commit 61f9b78
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion fedeca/utils/fedeca_graphs/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"""Graph utils for creating workflow graphs and tables."""
"""Graph utils for creating workflow graphs and tables."""
1 change: 1 addition & 0 deletions fedeca/utils/fedeca_graphs/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Utils to plot the graph from the workflow."""
1 change: 1 addition & 0 deletions fedeca/utils/fedeca_graphs/utils/data_classes.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Define useful abstractions for graph representation."""
from typing import NamedTuple
from typing import Union

Expand Down
2 changes: 2 additions & 0 deletions fedeca/utils/fedeca_graphs/utils/function_block_tree_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Define parsing functions."""
import re
from typing import Any

Expand All @@ -7,6 +8,7 @@
from fedeca.utils.fedeca_graphs.utils.data_classes import RemoteFunctionRpz
from typing import Union


def parse_block(block_content: str) -> dict[str, Any]:
"""
Parse a block of content to extract its name and initialize sub_blocks.
Expand Down
20 changes: 10 additions & 10 deletions fedeca/utils/fedeca_graphs/utils/graph_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Define useful utils for graph."""
from __future__ import annotations

from collections import OrderedDict
from collections.abc import Sequence
from typing import Literal

from graphviz import Digraph # type: ignore
Expand Down Expand Up @@ -121,10 +121,10 @@ def add_function_block(
max_depth,
depth: int,
shared_state_depth_map: dict[int, tuple[int, Digraph]],
connect_with_previous_shared_state: bool = True,
flatten_first_depth: bool = True,
shared_state_naming: Literal["id", "content"] = "id",
shared_state_mapping = None,
connect_with_previous_shared_state: bool=True,
flatten_first_depth: bool=True,
shared_state_naming: Literal["id", "content"]="id",
shared_state_mapping=None,
) -> tuple[
tuple[set[int], set[int], set[tuple[int, int]], dict[int, int], dict[int, int]],
dict[int, int],
Expand Down Expand Up @@ -471,11 +471,11 @@ def create_workflow_graph(
render_path,
max_depth,
function_block_name,
rank: int = 0,
flatten_first_depth: bool = True,
shared_state_naming: Literal["id", "content"] = "id",
render: bool = True,
shared_state_mapping = None,
rank: int=0,
flatten_first_depth: bool=True,
shared_state_naming: Literal["id", "content"]="id",
render: bool=True,
shared_state_mapping=None,
) -> tuple[set[int], set[int], set[tuple[int, int]]]:
"""
Create a workflow graph from shared states and function blocks.
Expand Down

0 comments on commit 61f9b78

Please sign in to comment.