Skip to content

Commit

Permalink
fix indentation and run prettier on meta.yml files
Browse files Browse the repository at this point in the history
  • Loading branch information
mirpedrol committed Jun 25, 2024
1 parent c848590 commit 440ec2f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nf_core/modules/lint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import nf_core.utils
from nf_core.components.components_utils import get_biotools_id
from nf_core.components.lint import ComponentLint, LintExceptionError, LintResult
from nf_core.lint_utils import console
from nf_core.lint_utils import console, run_prettier_on_file

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -256,7 +256,7 @@ def update_meta_yml_file(self, mod):
corrected_meta_yml = meta_yml.copy()
yaml = ruamel.yaml.YAML()
yaml.preserve_quotes = True
yaml.indent(mapping=2, sequence=2, offset=2)
yaml.indent(mapping=2, sequence=2, offset=0)

# Obtain inputs and outputs from main.nf and meta.yml
# Used to compare only the structure of channels and elements
Expand Down Expand Up @@ -347,3 +347,4 @@ def update_meta_yml_file(self, mod):
with open(mod.meta_yml, "w") as fh:
log.info(f"Updating {mod.meta_yml}")
yaml.dump(corrected_meta_yml, fh)
run_prettier_on_file(fh.name)

0 comments on commit 440ec2f

Please sign in to comment.