Skip to content

Commit

Permalink
fix: some small type hints fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
haidaraM committed Feb 12, 2022
1 parent 0e16ceb commit 89a526d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ansibleplaybookgrapher/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def _add_my_options(self):
"--open-protocol-custom-formats",
dest="open_protocol_custom_formats",
default=None,
help="""The custom formats to use as URLs for the nodes in the graph. Required if
help="""The custom formats to use as URLs for the nodes in the graph. Required if
--open-protocol-handler is set to custom.
You should provide a JSON formatted string like: {"file": "", "folder": ""}.
Example: If you want to open folders (roles) inside the browser and files (tasks) in
Expand Down
4 changes: 2 additions & 2 deletions ansibleplaybookgrapher/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def links_structure(self) -> Dict[Node, List[Node]]:
list of the linked nodes
:return:
"""
links = defaultdict(list)
links: Dict[Node, List[Node]] = defaultdict(list)
self._get_all_links(links)
return links

Expand Down Expand Up @@ -364,6 +364,6 @@ def get_all_tasks_nodes(composite: CompositeNode) -> List[TaskNode]:
:param composite:
:return:
"""
tasks = []
tasks: List[TaskNode] = []
_get_all_tasks_nodes(composite, tasks)
return tasks
2 changes: 1 addition & 1 deletion ansibleplaybookgrapher/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def _include_tasks_in_blocks(
parent_nodes: List[CompositeNode],
block: Union[Block, TaskInclude],
node_type: str,
play_vars: Dict = None,
play_vars: Dict,
):
"""
Recursively read all the tasks of the block and add it to the graph
Expand Down

0 comments on commit 89a526d

Please sign in to comment.