Skip to content

Commit cd475be

Browse files
committed
Require printf-style formatting for logging
https://docs.astral.sh/ruff/rules/logging-percent-format/
1 parent c16ebb9 commit cd475be

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

pyproject.toml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,18 @@ exclude = [
4242
]
4343

4444
select = [
45-
"D", # enable "pydocstyle" rules
46-
"D212", # summary lines must be on the first physical line of the docstring
47-
"D401", # imperative mood for all docstrings
48-
"D415", # summary line has to end in a punctuation mark
49-
"D417", # require documentation for *all* function parameters
45+
"G002", # no: log.info("%s: %s" % (m1, v1)) yes: log.info("%s: %s", m1, v1)
46+
"D", # enable "pydocstyle" rules
47+
"D212", # summary lines must be on the first physical line of the docstring
48+
"D401", # imperative mood for all docstrings
49+
"D415", # summary line has to end in a punctuation mark
50+
"D417", # require documentation for *all* function parameters
5051
"DOC102", # check for parameters which are not in the function signature
5152
# "DOC101", # enable as soon as ruff/pull/21076 has been merged!
53+
]
5254

55+
logger-objects = [
56+
"imcflibs.log.LOG", # tell ruff this is a logger object
5357
]
5458

5559
ignore = [

0 commit comments

Comments
 (0)