Skip to content

Commit 16bc2dc

Browse files
committed
Update Ruff to >=0.13 and simplify configs
1 parent d47a969 commit 16bc2dc

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ doc = [
5151
check = [
5252
"pytest-checkdocs >= 2.4",
5353
"pytest-ruff >= 0.2.1; sys_platform != 'cygwin'",
54+
# Deprecated rules must now be selected by exact rule code
55+
"ruff >= 0.13; sys_platform != 'cygwin'",
5456
]
5557

5658
cover = [

ruff.toml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,25 @@ extend-select = [
1111
"FA", # flake8-future-annotations
1212
"F404", # late-future-import
1313
"PYI", # flake8-pyi
14-
"UP006", # non-pep585-annotation
15-
"UP007", # non-pep604-annotation
16-
"UP010", # unnecessary-future-import
17-
"UP035", # deprecated-import
18-
"UP037", # quoted-annotation
19-
"UP043", # unnecessary-default-type-args
14+
15+
# Code modernization (strings, annotations, conditions, ...)
16+
"UP", # pyupgrade
2017

2118
# local
2219
]
2320
ignore = [
2421
# upstream
22+
"UP015", # redundant-open-modes, explicit is preferred
2523

2624
# Typeshed rejects complex or non-literal defaults for maintenance and testing reasons,
2725
# irrelevant to this project.
2826
"PYI011", # typed-argument-default-in-stub
2927
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
3028
"W191",
31-
"E111",
32-
"E114",
33-
"E117",
3429
"D206",
3530
"D300",
36-
"Q000",
37-
"Q001",
38-
"Q002",
39-
"Q003",
4031
"COM812",
4132
"COM819",
42-
4333
# local
4434
]
4535

0 commit comments

Comments
 (0)