Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion scripts/templater.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
3 changes: 1 addition & 2 deletions src/uwtools/j2template.py
Comment thread
venitahagerty marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions tests/test_templater.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions tests/test_validators.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down