|
1 | 1 | from importlib import import_module |
2 | 2 | from inspect import isfunction |
3 | | -from typing import Optional |
| 3 | +from typing import Any, Optional |
4 | 4 |
|
5 | 5 | import numpy as np |
6 | 6 | from pyiron_base import Project, job |
@@ -30,7 +30,8 @@ def _resort_total_lst(total_lst: list, nodes_dict: dict) -> list: |
30 | 30 | nodes_without_dep_lst = [ |
31 | 31 | k for k in nodes_dict.keys() if k not in nodes_with_dep_lst |
32 | 32 | ] |
33 | | - ordered_lst, total_new_lst = [], [] |
| 33 | + ordered_lst: list = [] |
| 34 | + total_new_lst: list[list] = [] |
34 | 35 | while len(total_new_lst) < len(total_lst): |
35 | 36 | for ind, connect in total_lst: |
36 | 37 | if ind not in ordered_lst: |
@@ -74,7 +75,7 @@ def _get_source( |
74 | 75 | def _get_delayed_object_dict( |
75 | 76 | total_lst: list, nodes_dict: dict, source_handle_dict: dict, pyiron_project: Project |
76 | 77 | ) -> dict: |
77 | | - delayed_object_dict = {} |
| 78 | + delayed_object_dict: dict[Any, DelayedObject] = {} |
78 | 79 | for item in total_lst: |
79 | 80 | key, input_dict = item |
80 | 81 | kwargs = { |
@@ -134,8 +135,9 @@ def _get_unique_objects(nodes_dict: dict): |
134 | 135 | ) |
135 | 136 | delayed_object_dict[k]._python_function = get_dict |
136 | 137 | delayed_object_dict[k]._input = v |
137 | | - unique_lst = [] |
138 | | - delayed_object_updated_dict, match_dict = {}, {} |
| 138 | + unique_lst: list = [] |
| 139 | + delayed_object_updated_dict: dict[Any, DelayedObject] = {} |
| 140 | + match_dict: dict[Any, Any] = {} |
139 | 141 | for dobj in delayed_object_dict.keys(): |
140 | 142 | match = False |
141 | 143 | for obj in unique_lst: |
|
0 commit comments