Skip to content

Commit f6a6ab2

Browse files
committed
fix typing
1 parent 2acd2ff commit f6a6ab2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

nf_core/components/components_utils.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ def prompt_component_version_sha(
147147

148148
def get_components_to_install(
149149
subworkflow_dir: Union[str, Path],
150-
) -> Tuple[List[Dict[str, Optional[str]]], List[Dict[str, Optional[str]]]]:
150+
) -> Tuple[List[Dict[str, str]], List[Dict[str, str]]]:
151151
"""
152152
Parse the subworkflow main.nf file to retrieve all imported modules and subworkflows.
153153
"""
154-
modules: Dict[str, Dict[str, Optional[str]]] = {}
155-
subworkflows: Dict[str, Dict[str, Optional[str]]] = {}
154+
modules: Dict[str, Dict[str, str]] = {}
155+
subworkflows: Dict[str, Dict[str, str]] = {}
156156

157157
with open(Path(subworkflow_dir, "main.nf")) as fh:
158158
for line in fh:
@@ -165,7 +165,7 @@ def get_components_to_install(
165165
if link.startswith("../../../"):
166166
name_split = name.lower().split("_")
167167
component_name = "/".join(name_split)
168-
component_dict: Dict[str, Optional[str]] = {
168+
component_dict: Dict[str, str] = {
169169
"name": component_name,
170170
}
171171
modules[component_name] = component_dict

nf_core/modules/modules_json.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ def get_dependent_components(
10431043
component_type,
10441044
name,
10451045
dependent_components,
1046-
) -> Tuple[(str, str, str)]:
1046+
) -> dict[str, Tuple[str, str, str]]:
10471047
"""
10481048
Retrieves all pipeline modules/subworkflows that are reported in the modules.json
10491049
as being installed by the given component

0 commit comments

Comments
 (0)