Skip to content

Commit

Permalink
Reformat new files with line length 92
Browse files Browse the repository at this point in the history
In anticipation of GH-358, minimize future work.
  • Loading branch information
TimothyWillard committed Nov 4, 2024
1 parent 6be1a62 commit 0e69303
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 22 deletions.
6 changes: 1 addition & 5 deletions flepimop/gempyor_pkg/src/gempyor/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,7 @@ def emit(self, record: logging.LogRecord) -> None:
[`logging.Handler.emit`](https://docs.python.org/3/library/logging.html#logging.Handler.emit)
"""
msg = self.format(record)
msg = (
f"{msg}."
if self._punctuate and not msg.endswith(self._punctuation)
else msg
)
msg = f"{msg}." if self._punctuate and not msg.endswith(self._punctuation) else msg
click.echo(
message=msg, file=self._file, nl=self._nl, err=self._err, color=self._color
)
Expand Down
8 changes: 2 additions & 6 deletions flepimop/gempyor_pkg/tests/batch/test__sbatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ def test_export_option_causes_value_error(sample_sbatch_script: Path) -> None:
),
),
)
@pytest.mark.parametrize(
"verbosity", (None, logging.DEBUG, logging.INFO, logging.WARNING)
)
@pytest.mark.parametrize("verbosity", (None, logging.DEBUG, logging.INFO, logging.WARNING))
@pytest.mark.parametrize("dry_run", (True, False))
def test_output_validation(
caplog: pytest.LogCaptureFixture,
Expand Down Expand Up @@ -128,9 +126,7 @@ def subprocess_run_wraps(args, **kwargs):

if not dry_run:
args: list[str] = subprocess_run_patch.call_args.args[0]
assert len(args) == 2 + len(options) + min(
len(environment_variables), 1
)
assert len(args) == 2 + len(options) + min(len(environment_variables), 1)
assert Path(args[-1]) == sample_sbatch_script
if environment_variables:
assert args[1].startswith("--export=")
Expand Down
6 changes: 1 addition & 5 deletions flepimop/gempyor_pkg/tests/batch/test_write_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ def git_head_wraps(repository: Path) -> str:

with patch("gempyor.batch._git_head", wraps=git_head_wraps) as git_head_patch:
manifest_file = write_manifest(
job_name,
flepi_path,
project_path,
destination=destination,
**additional_meta
job_name, flepi_path, project_path, destination=destination, **additional_meta
)
assert (
manifest_file == Path("manifest.json").absolute()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,5 @@ def test__get_logging_level_negative_verbosity_value_error(verbosity: int) -> No
(5, logging.DEBUG),
),
)
def test__get_logging_level_output_validation(
verbosity: int, expected_level: int
) -> None:
def test__get_logging_level_output_validation(verbosity: int, expected_level: int) -> None:
assert _get_logging_level(verbosity) == expected_level
4 changes: 1 addition & 3 deletions flepimop/gempyor_pkg/tests/logging/test_get_script_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ def test_get_script_logger(
if log_format is None:
logger = get_script_logger(name, verbosity, handler=handler)
else:
logger = get_script_logger(
name, verbosity, handler=handler, log_format=log_format
)
logger = get_script_logger(name, verbosity, handler=handler, log_format=log_format)

assert isinstance(logger, logging.Logger)
assert logger.name == name
Expand Down

0 comments on commit 0e69303

Please sign in to comment.