Skip to content

Commit c70353a

Browse files
author
Mathieu Scheltienne
committed
enable A and B ruff rules
1 parent fa7b3c8 commit c70353a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,15 @@ extend-exclude = [
149149
]
150150
ignore = []
151151
line-length = 88
152-
select = ["E", "F", "UP", "W"]
152+
select = ["A", "B", "E", "F", "UP", "W"]
153153
target-version = 'py39'
154154

155155
[tool.ruff.format]
156156
docstring-code-format = true
157157

158158
[tool.ruff.per-file-ignores]
159159
'*' = [
160+
"B904", # 'Within an except clause, raise exceptions with raise ... from ...'
160161
"UP007", # 'Use `X | Y` for type annotations', requires python 3.10
161162
]
162163
'*.pyi' = ['E501']

template/utils/logs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class _LoggerFormatter(logging.Formatter):
103103
def __init__(self):
104104
super().__init__(fmt="%(levelname): %(message)s")
105105

106-
def format(self, record: logging.LogRecord):
106+
def format(self, record: logging.LogRecord): # noqa: A003
107107
"""Format the received log record.
108108
109109
Parameters

0 commit comments

Comments
 (0)