You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pyproject.toml
+27-13Lines changed: 27 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -39,51 +39,54 @@ select = ["ALL"]
39
39
ignore = [
40
40
# Reason for ignoring:
41
41
# DI: Disagree - I disagree with this rule in nearly all cases.
42
-
#AL: Alternative - The rule is incompatible with an alternative rule.
42
+
#HI: Hint- The rule would be useful at hint-severity, if ruff supported that.
43
43
# TB: Too broad - The rule is sometimes useful, but gives too many false positives.
44
+
# AL: Alternative - The rule is incompatible with an alternative rule.
44
45
# PA: Public API - The fix may require changing a public API, making this rule unusable in many cases.
45
-
#HI: Hint - The rule would be useful at hint-severity, if ruff supported that.
46
+
#NA: Not applicable - The rule is not applicable in this particular situation / project type / directory.
46
47
# PR: Project-specific - There is a project-specific reason to not use this rule.
47
48
48
49
# Mainly DI
50
+
"D203", # incorrect-blank-line-before-class - DI, AL - Disabled in favor of D211.
49
51
"RUF010", # explicit-f-string-type-conversion - DI - Explicit conversion is more readable. See also https://peps.python.org/pep-0498/#s-r-and-a-are-redundant
50
52
51
-
# Mainly AL
52
-
"D203", # incorrect-blank-line-before-class - AL - Disabled in favor of D211.
53
-
"D213", # multi-line-summary-second-line - AL - Disabled in favor of D212.
53
+
# Mainly HI
54
+
"FIX", # flake8-fixme - HI
55
+
"TD", # flake8-todos - HI
54
56
55
57
# Mainly TB
56
58
"ANN401", # any-type - TB - Any can be useful for very generic interfaces or as an acceptable temporary solution.
57
59
"B007", # unused-loop-control-variable - TB - The loop variable may be used after the loop; it might count something. Redundant with F841.
58
60
"C90", # mccabe - TB - May be hard to fix, and real issues can be spotted manually.
59
-
"D1", # undocumented-* - TB - Documenting everything is not necessary in scripts.
60
61
"D105", # undocumented-magic-method - TB - Many magic methods are self-explanatory.
61
62
"D202", # blank-line-after-function - TB - Adding a blank line can improve readability when the docstring is short.
62
63
"D204", # incorrect-blank-line-after-class - TB - The blank line can be unnecessary for very short classes.
63
64
"D205", # missing-blank-line-after-summary - TB - A single line is sometimes too limiting, and most tools can handle multiple lines.
64
65
"D209", # new-line-after-last-paragraph - TB - It's a bit nasty, but breaking this rule can help compactify short docstrings.
65
66
"D301", # escape-sequence-in-docstring - TB - It's a bit nasty, but breaking this rule with "\n" can help compactify short docstrings.
66
-
"D400", # missing-trailing-period - TB- Other punctuation is also acceptable. We use D415 instead.
67
+
"D400", # missing-trailing-period - TB, AL - Other punctuation is also acceptable. Disabled in favor of D415.
67
68
"D401", # non-imperative-mood - TB - This is very controversial. I personally prefer the descriptive mood in most cases.
68
69
"D404", # docstring-starts-with-this - TB - There are valid usages of "this", such as when referring to a method's object.
69
70
"E501", # line-too-long - TB - Lines occasionally need to be longer, such as when a comment contains a long link.
70
71
"E701", # multiple-statements - TB - Single-line if-statements can be more readable in certain scenarios.
71
72
"E741", # ambiguous-variable-name - TB - "l" is often fine, and the others may occasionally be fine as well.
72
73
"ERA001", # commented-out-code - TB - Commenting out code is sometimes useful, and this also triggers on intentional code examples.
73
-
"FBT001", # boolean-type-hint-positional-argument - TB, PA - Mostly redundant with FBT003.
74
-
"FBT002", # boolean-default-value-positional-argument - TB, PA - Mostly redundant with FBT003.
74
+
"FBT001", # boolean-type-hint-positional-argument - TB, PA, and mostly redundant with FBT003.
75
+
"FBT002", # boolean-default-value-positional-argument - TB, PA, and mostly redundant with FBT003.
75
76
"INP001", # implicit-namespace-package - TB - The namespace package may be intentional. Also triggers on Sphinx' conf.py.
76
77
"ISC003", # explicit-string-concatenation - TB - In cases where some lines are literals and some expressions, it is clearer to use + everywhere.
77
78
"PERF203", # try-except-in-loop - TB - The try-except can often not be taken out of the loop.
78
79
"PLR091", # too-many-* - TB, PA - Real issues can be spotted manually.
79
80
"PLR2004", # magic-value-comparison - TB - Although this rule is often right, there are also many cases where a constant is overkill.
80
81
"PLW2901", # redefined-loop-name - TB - Reuse of the loop variable can help keep names simple. This rule does have a strong case, though.
81
82
"PTH", # flake8-use-pathlib - TB, HI - Old-style path manipulation is acceptable, and occasionally even more readable.
83
+
"S101", # assert - TB - Assertions can be useful, such as for telling type checkers that a value cannot be None.
82
84
"S311", # suspicious-non-cryptographic-random-usage - TB - Not all random usages are cryptographic.
85
+
"S603", # subprocess-without-shell-equals-true - TB - (Rule name is misleading.) This triggers so easily that it is practically unusable.
86
+
"SIM108", # if-else-block-instead-of-if-exp - TB - A regular if-statement is sometimes more readable or consistent.
0 commit comments