Skip to content

Commit

Permalink
black linting for gempyor.logging
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyWillard committed Jan 7, 2025
1 parent e090873 commit a983af2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 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
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 a983af2

Please sign in to comment.