Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1a2f930

Browse filesBrowse files
Avasamjaraco
andauthored
Select Ruff rules for modern type annotations (jaraco/skeleton#160)
* Select Ruff rules for modern type annotations Ensure modern type annotation syntax and best practices Not including those covered by type-checkers or exclusive to Python 3.11+ Not including rules currently in preview either. These are the same set of rules I have in pywin32 as of mhammond/pywin32#2458 setuptools has all the same rules enabled (except it also includes the `UP` group directly) * Add PYI011 ignore and #local section * Update ruff.toml Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> * Add # upstream --------- Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
1 parent 1c9467f commit 1a2f930
Copy full SHA for 1a2f930

File tree

1 file changed

+23
-0
lines changed
Filter options

1 file changed

+23
-0
lines changed

‎ruff.toml

Copy file name to clipboardExpand all lines: ruff.toml
+23Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,32 @@ extend = "pyproject.toml"
33

44
[lint]
55
extend-select = [
6+
# upstream
7+
68
"C901",
79
"PERF401",
810
"W",
11+
12+
# Ensure modern type annotation syntax and best practices
13+
# Not including those covered by type-checkers or exclusive to Python 3.11+
14+
"FA", # flake8-future-annotations
15+
"F404", # late-future-import
16+
"PYI", # flake8-pyi
17+
"UP006", # non-pep585-annotation
18+
"UP007", # non-pep604-annotation
19+
"UP010", # unnecessary-future-import
20+
"UP035", # deprecated-import
21+
"UP037", # quoted-annotation
22+
"UP043", # unnecessary-default-type-args
23+
24+
# local
925
]
1026
ignore = [
27+
# upstream
28+
29+
# Typeshed rejects complex or non-literal defaults for maintenance and testing reasons,
30+
# irrelevant to this project.
31+
"PYI011", # typed-argument-default-in-stub
1132
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
1233
"W191",
1334
"E111",
@@ -23,6 +44,8 @@ ignore = [
2344
"COM819",
2445
"ISC001",
2546
"ISC002",
47+
48+
# local
2649
]
2750

2851
[format]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.