Skip to content

Commit 4323c17

Browse files
committed
fix docstrings
1 parent 3307bfa commit 4323c17

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

nf_core/components/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def get_local_yaml(self) -> dict | None:
173173
"""Attempt to get the meta.yml file from a locally installed module/subworkflow.
174174
175175
Returns:
176-
Optional[dict]: Parsed meta.yml if found, None otherwise
176+
dict | None: Parsed meta.yml if found, None otherwise
177177
"""
178178

179179
if self.repo_type == "pipeline":

nf_core/modules/lint/main_nf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def check_process_section(self, lines, registry, fix_version, progress_bar):
249249
progress_bar (ProgressBar): Progress bar to update.
250250
251251
Returns:
252-
Optional[bool]: True if singularity and docker containers match, False otherwise. If process definition does not exist, None.
252+
bool | None: True if singularity and docker containers match, False otherwise. If process definition does not exist, None.
253253
"""
254254
# Check that we have a process section
255255
if len(lines) == 0:

nf_core/pipelines/bump_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def update_file_version(
210210
patterns (List[Tuple[str, str]]): A list of tuples containing the regex patterns to
211211
match and the replacement strings.
212212
required (bool, optional): Whether the file is required to exist. Defaults to `True`.
213-
yaml_key (Optional[List[str]], optional): The YAML key to update. Defaults to `None`.
213+
yaml_key (List[str] | None, optional): The YAML key to update. Defaults to `None`.
214214
"""
215215
fn: Path = pipeline_obj._fp(filename)
216216

nf_core/pipelines/download/container_fetcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ class ContainerFetcher(ABC):
190190
container_library (Iterable[str]): A collection of container libraries to use
191191
registry_set (Iterable[str]): A collection of registries to consider
192192
progress_factory (Callable[[], ContainerProgress]): A factory to create a progress bar.
193-
library_dir (Optional[Path]): The directory to look for container images in.
194-
cache_dir (Optional[Path]): A directory where container images might be cached.
193+
library_dir (Path | None): The directory to look for container images in.
194+
cache_dir (Path | None): A directory where container images might be cached.
195195
amend_cachedir (bool): Whether to amend the cache directory with the container images.
196196
parallel (int): The number of containers to fetch in parallel.
197197
"""

nf_core/pipelines/download/download.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@ class DownloadWorkflow:
4747
Can also download its Singularity container image if required.
4848
4949
Args:
50-
pipeline (Optional[str]): A nf-core pipeline name.
51-
revision (Optional[Union[tuple[str], str]]): The workflow revision(s) to download, like `1.0` or `dev` . Defaults to None.
52-
outdir (Optional[Path]): Path to the local download directory. Defaults to None.
53-
compress_type (Optional[str]): Type of compression for the downloaded files. Defaults to None.
50+
pipeline (str | None): A nf-core pipeline name.
51+
revision (tuple[str] | str | None): The workflow revision(s) to download, like `1.0` or `dev` . Defaults to None.
52+
outdir (Path | None): Path to the local download directory. Defaults to None.
53+
compress_type (str | None): Type of compression for the downloaded files. Defaults to None.
5454
force (bool): Flag to force download even if files already exist (overwrite existing files). Defaults to False.
5555
platform (bool): Flag to customize the download for Seqera Platform (convert to git bare repo). Defaults to False.
56-
download_configuration (Optional[str]): Download the configuration files from nf-core/configs. Defaults to None.
57-
additional_tags (Optional[Union[list[str], str]]): Specify additional tags to add to the downloaded pipeline. Defaults to None.
56+
download_configuration (str | None): Download the configuration files from nf-core/configs. Defaults to None.
57+
additional_tags (list[str] | str | None): Specify additional tags to add to the downloaded pipeline. Defaults to None.
5858
container_system (str): The container system to use (e.g., "singularity"). Defaults to None.
59-
container_library (Optional[Union[tuple[str], str]]): The container libraries (registries) to use. Defaults to None.
60-
container_cache_utilisation (Optional[str]): If a local or remote cache of already existing container images should be considered. Defaults to None.
61-
container_cache_index (Optional[Path]): An index for the remote container cache. Defaults to None.
59+
container_library (tuple[str] | str | None): The container libraries (registries) to use. Defaults to None.
60+
container_cache_utilisation (str | None): If a local or remote cache of already existing container images should be considered. Defaults to None.
61+
container_cache_index (Path | None): An index for the remote container cache. Defaults to None.
6262
parallel (int): The number of parallel downloads to use. Defaults to 4.
6363
hide_progress (bool): Flag to hide the progress bar. Defaults to False.
6464
"""

0 commit comments

Comments
 (0)