Skip to content

Commit 60ef001

Browse files
committed
Add ruff configuration
1 parent 100fc5d commit 60ef001

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

pyproject.toml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,92 @@ title_template = "{version}"
6868
# Profiles that are excluded from the contributor list.
6969
ignored_user_logins = ["dependabot[bot]", "pre-commit-ci[bot]"]
7070

71+
[tool.ruff.lint]
72+
extend-select = [
73+
"B", # flake8-bugbear
74+
"I", # isort
75+
"ARG", # flake8-unused-arguments
76+
"C4", # flake8-comprehensions
77+
"EM", # flake8-errmsg
78+
"ICN", # flake8-import-conventions
79+
"G", # flake8-logging-format
80+
"PGH", # pygrep-hooks
81+
"PIE", # flake8-pie
82+
"PL", # pylint
83+
"PT", # flake8-pytest-style
84+
"PTH", # flake8-use-pathlib
85+
"RET", # flake8-return
86+
"RUF", # Ruff-specific
87+
"SIM", # flake8-simplify
88+
"T20", # flake8-print
89+
"UP", # pyupgrade
90+
"YTT", # flake8-2020
91+
"EXE", # flake8-executable
92+
"NPY", # NumPy specific rules
93+
"PD", # pandas-vet
94+
"FURB", # refurb
95+
"PYI", # flake8-pyi
96+
]
97+
ignore = [
98+
"PLR09", # Too many <...>
99+
"PLR2004", # Magic value used in comparison
100+
"ISC001", # Conflicts with formatter
101+
"ARG001", # FIXME: consider removing this and the following rules from this list
102+
"ARG002",
103+
"B004",
104+
"B007",
105+
"B023",
106+
"B028",
107+
"B034",
108+
"C408",
109+
"E402",
110+
"E741",
111+
"EM101",
112+
"EM102",
113+
"EXE001",
114+
"F401",
115+
"F811",
116+
"F821",
117+
"F841",
118+
"PIE810",
119+
"PLW0603",
120+
"PLW2901",
121+
"PLW3301",
122+
"PT006",
123+
"PT007",
124+
"PT011",
125+
"PT012",
126+
"PT013",
127+
"PTH100",
128+
"PTH118",
129+
"PTH120",
130+
"PTH123",
131+
"PYI024",
132+
"RET503",
133+
"RET504",
134+
"RET505",
135+
"RET506",
136+
"RET507",
137+
"RET508",
138+
"RUF005",
139+
"RUF012",
140+
"RUF013",
141+
"SIM102",
142+
"SIM105",
143+
"SIM108",
144+
"SIM115",
145+
"T201",
146+
"UP006",
147+
"UP031",
148+
"UP035",
149+
]
150+
151+
[tool.ruff.lint.per-file-ignores]
152+
"doc/example.py" = ["ARG001", "F401", "I001"]
153+
154+
[tool.ruff.format]
155+
docstring-code-format = true
156+
71157
[tool.setuptools]
72158
include-package-data = false
73159
packages = [

0 commit comments

Comments
 (0)