Skip to content

Commit 23e23ec

Browse files
committed
Switch formatters
1 parent 2c77735 commit 23e23ec

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@ ci:
33
autoupdate_schedule: monthly
44

55
repos:
6-
- repo: https://github.com/psf/black
7-
rev: 24.8.0
8-
hooks:
9-
- id: black
10-
116
- repo: https://github.com/astral-sh/ruff-pre-commit
12-
rev: v0.6.3
7+
rev: v0.6.5
138
hooks:
9+
- id: ruff-format
1410
- id: ruff
1511
args: [--fix, --exit-non-zero-on-fix]
1612

pyproject.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,9 @@ fail-under = 100
114114
whitelist-regex = ["test_.*"]
115115

116116

117-
[tool.black]
118-
line-length = 79
119-
120-
121117
[tool.ruff]
122118
src = ["src", "tests"]
119+
line-length = 79
123120

124121
[tool.ruff.lint]
125122
select = ["ALL"]
@@ -128,13 +125,14 @@ ignore = [
128125
"ANN", # Mypy is better at this
129126
"ARG", # unused arguments are common w/ interfaces
130127
"C901", # sometimes you trade complexity for performance
131-
"COM", # Black takes care of our commas
128+
"COM", # Formatter takes care of our commas
132129
"D", # We prefer our own docstring style.
133-
"E501", # leave line-length enforcement to Black
130+
"E501", # leave line-length enforcement to formatter
134131
"EM101", # simple strings are fine
135132
"FBT", # bools are our friends
136133
"FIX", # Yes, we want XXX as a marker.
137134
"INP001", # sometimes we want Python files outside of packages
135+
"ISC001", # conflicts with formatter
138136
"N802", # some names are non-pep8 due to stdlib logging / Twisted
139137
"N803", # ditto
140138
"N806", # ditto

src/structlog/_config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,9 @@ def bind(self, **new_values: Any) -> BindableLogger:
363363
# Looks like Protocols ignore definitions of __init__ so we have to
364364
# silence Mypy here.
365365
logger = cls(
366-
_logger, processors=procs, context=ctx # type: ignore[call-arg]
366+
_logger,
367+
processors=procs,
368+
context=ctx, # type: ignore[call-arg]
367369
)
368370

369371
def finalized_bind(**new_values: Any) -> BindableLogger:

0 commit comments

Comments
 (0)