From 0d7925bc1e7e0084b7956a0386b1cf7316d05f44 Mon Sep 17 00:00:00 2001 From: Arthur Gymer <24782660+awgymer@users.noreply.github.com> Date: Fri, 9 Dec 2022 14:35:19 +0000 Subject: [PATCH] Return from get_username and make sure it is assigned back to self.author --- nf_core/components/components_create.py | 2 ++ nf_core/modules/create.py | 2 +- nf_core/subworkflows/create.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nf_core/components/components_create.py b/nf_core/components/components_create.py index a8d56411ba..86c42c0373 100644 --- a/nf_core/components/components_create.py +++ b/nf_core/components/components_create.py @@ -173,3 +173,5 @@ def get_username(author): f"[violet]GitHub Username:[/]{' (@author)' if author_default is None else ''}", default=author_default, ) + + return author diff --git a/nf_core/modules/create.py b/nf_core/modules/create.py index b4899750d7..019a77c71f 100644 --- a/nf_core/modules/create.py +++ b/nf_core/modules/create.py @@ -123,7 +123,7 @@ def create(self): self._get_bioconda_tool() # Prompt for GitHub username - nf_core.components.components_create.get_username(self.author) + self.author = nf_core.components.components_create.get_username(self.author) self._get_module_structure_components() diff --git a/nf_core/subworkflows/create.py b/nf_core/subworkflows/create.py index d5f9a5efbb..e61f0c6c8d 100644 --- a/nf_core/subworkflows/create.py +++ b/nf_core/subworkflows/create.py @@ -88,7 +88,7 @@ def create(self): ) # Prompt for GitHub username - nf_core.components.components_create.get_username(self.author) + self.author = nf_core.components.components_create.get_username(self.author) # Create subworkflow template with jinja2 nf_core.components.components_create.render_template(self.component_type, vars(self), self.file_paths)