diff --git a/.pylintrc b/.pylintrc index 198b86810..a976db8b0 100644 --- a/.pylintrc +++ b/.pylintrc @@ -374,7 +374,7 @@ ignore-docstrings=yes ignore-imports=no # Minimum lines number of a similarity. -min-similarity-lines=4 +min-similarity-lines=15 [IMPORTS] diff --git a/scripts/templater.py b/scripts/templater.py index 684403d55..991fa575f 100644 --- a/scripts/templater.py +++ b/scripts/templater.py @@ -107,7 +107,7 @@ def set_template(argv): name = f"{inspect.stack()[0][3]}" log = cli_helpers.setup_logging(user_args, log_name=name) - log.info("""Running script with args: """) + log.info(f"""Running {name} with args: """) log.info(f"""{('-' * 70)}""") log.info(f"""{('-' * 70)}""") for name, val in user_args.__dict__.items(): diff --git a/src/uwtools/j2template.py b/src/uwtools/j2template.py index 88345c71d..c0e0e8626 100644 --- a/src/uwtools/j2template.py +++ b/src/uwtools/j2template.py @@ -123,8 +123,7 @@ def _load_file(self, template_path): Jinja2 Template object ''' - self._j2env=Environment(loader=FileSystemLoader(searchpath='/'), - trim_blocks=True,lstrip_blocks=True) + self._j2env=Environment(loader=FileSystemLoader(searchpath='/')) register_filters(self._j2env) return self._j2env.get_template(template_path) diff --git a/tests/test_templater.py b/tests/test_templater.py index 1167bb4ed..d518ed7f0 100644 --- a/tests/test_templater.py +++ b/tests/test_templater.py @@ -37,7 +37,7 @@ def test_set_template_dryrun(): #pylint: disable=unused-variable input_file = os.path.join(uwtools_file_base, "fixtures/nml.IN") outcome=\ - """Running script with args: + """Running set_template with args: ---------------------------------------------------------------------- ---------------------------------------------------------------------- outfile: None @@ -82,7 +82,7 @@ def test_set_template_listvalues(): #pylint: disable=unused-variable input_file = os.path.join(uwtools_file_base, "fixtures/nml.IN") outcome=\ - """Running script with args: + """Running set_template with args: ---------------------------------------------------------------------- ---------------------------------------------------------------------- outfile: None @@ -186,7 +186,7 @@ def test_set_template_command_line_config(): #pylint: disable=unused-variable input_file = os.path.join(uwtools_file_base, "fixtures/nml.IN") outcome=\ - """Running script with args: + """Running set_template with args: ---------------------------------------------------------------------- ---------------------------------------------------------------------- outfile: None @@ -257,7 +257,7 @@ def test_set_template_verbosity(): #pylint: disable=unused-variable outcome=\ f"""Finished setting up debug file logging in {logfile} -Running script with args: +Running set_template with args: ---------------------------------------------------------------------- ---------------------------------------------------------------------- outfile: None diff --git a/tests/test_validators.py b/tests/test_validators.py index 0dc531e70..52ac163ef 100644 --- a/tests/test_validators.py +++ b/tests/test_validators.py @@ -1,13 +1,18 @@ ''' Tests for schema validation tool ''' + +# pylint: disable=wrong-import-position,wrong-import-order + +import pytest +jsonschema = pytest.importorskip("jsonschema") + import io import json from contextlib import redirect_stdout import os import pathlib -import jsonschema -import pytest +import jsonschema # pylint: disable=import-error import yaml