xref: /petsc/src/binding/petsc4py/.ruff.toml (revision 552edb6364df478b294b3111f33a8f37ca096b20)
1include = ["*.py", "src/*.py"]
2exclude = ["demo/legacy", "*env"]
3
4[lint]
5select = [
6  "A",
7  "B",
8  "C",
9  # "D",
10  "E",
11  "F",
12  "G",
13  # "I",
14  "S",
15  "W",
16  "UP",
17  # "ARG",
18  # "ISC",
19  "PIE",
20  # "PTH",
21  "PYI",
22  "RET",
23  # "RUF",
24  # "TRY",
25  "YTT",
26]
27
28ignore = [
29  "E501",  # Line too long
30  "E731",  # Do not assign a `lambda` expression, use a `def`
31  "G004",  # Logging statement uses f-string
32  "S110",  # `try`-`except`-`pass` detected, consider logging the exception
33  "UP015", # [*] Unnecessary open mode parameters
34  "C901",  # `function` is too complex
35]
36
37[format]
38quote-style = "single"
39
40[lint.per-file-ignores]
41"demo/*" = ["E402", "PIE790",]
42