-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy path.ruff.toml
More file actions
71 lines (65 loc) · 2.21 KB
/
.ruff.toml
File metadata and controls
71 lines (65 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
fix = true
exclude = [
"docs/conf.py",
"docs/_scripts/*.py",
"docs/naps/*.md",
]
[format]
quote-style = "single"
[lint]
select = [
"E", "F", "W", #flake8
"UP", # pyupgrade
"I", # isort
"YTT", #flake8-2020
"TC", # flake8-type-checing
"BLE", # flake8-blind-exception
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"PIE", # flake8-pie
"COM", # flake8-commas
"SIM", # flake8-simplify
"INP", # flake8-no-pep420
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"TID", # flake8-tidy-imports # replace absolutify import
"TRY", # tryceratops
"ICN", # flake8-import-conventions
"RUF", # ruff specyfic rules
"NPY201", # checks compatibility with numpy version 2.0
"ASYNC", # flake8-async
"EXE", # flake8-executable
"FA", # flake8-future-annotations
"LOG", # flake8-logging
"SLOT", # flake8-slots
"PT", # flake8-pytest-style
"T20", # flake8-print
]
ignore = [
"E501", "TC001", "TC002", "TC003",
"A003", # flake8-builtins - we have class attributes violating these rule
"COM812", # flake8-commas - we don't like adding comma on single line of arguments
"COM819", # conflicts with ruff-format
"RET504", # not fixed yet https://github.com/charliermarsh/ruff/issues/2950
"TRY003", # require implement multiple exception class
"RUF005", # problem with numpy compatybility, see https://github.com/charliermarsh/ruff/issues/2142#issuecomment-1451038741
"B028", # need to be fixed
"PYI015", # it produces bad looking files (@jni opinion)
"W191", "Q000", "Q001", "Q002", "Q003", "ISC001", # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"UP007", # temporary disable migrtion form Union[X, Y] to X | Y
"UP045", # temporary disable migrtion from Optional[X] to X | None
"TC006", # put types in quotes in typing.cast
]
[lint.flake8-builtins]
builtins-allowed-modules = ["io", "types", "threading"]
[lint.pyupgrade]
keep-runtime-typing = true
[lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "single"
multiline-quotes = "double"