Skip to content

Commit 6090ff6

Browse files
committed
Update Ruff
1 parent 527f492 commit 6090ff6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
- id: black
1010

1111
- repo: https://github.com/astral-sh/ruff-pre-commit
12-
rev: v0.4.7
12+
rev: v0.5.0
1313
hooks:
1414
- id: ruff
1515
args: [--fix, --exit-non-zero-on-fix]

src/structlog/dev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def _pad(s: str, length: int) -> str:
7373
"""
7474
missing = length - len(s)
7575

76-
return s + " " * (missing if missing > 0 else 0)
76+
return s + " " * (max(0, missing))
7777

7878

7979
if colorama is not None:

tests/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ def test_configure_once_issues_warning_on_repeated_call(self):
437437
configure_once()
438438

439439
assert 1 == len(warns)
440-
assert RuntimeWarning == warns[0].category
440+
assert RuntimeWarning is warns[0].category
441441
assert "Repeated configuration attempted." == warns[0].message.args[0]
442442

443443
def test_get_logger_configures_according_to_config(self):

0 commit comments

Comments
 (0)