-
-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to use ruff #2795
Switch to use ruff #2795
Changes from 39 commits
828ff80
25dddba
228194d
a7df9b1
25fe2fb
dfc8820
78d67c1
0a4486b
2a4aff1
1239a4b
8193e23
1a67d10
06bcb00
1efd80e
59a0a8c
2e72f74
dc76e17
561453e
9cf4394
8f88afc
43bec76
3024fbb
b90c337
f232ce2
f842f15
a756800
8b3ad2f
4f7621d
5023739
64ee1cd
b6b675e
7e5122a
defb75b
2d60883
1c1dbf7
bef1141
961eb13
6cc59b7
211dd8d
d364693
8b8dc70
1812bf7
7ed8e69
dcce938
951d42a
54ee74d
af0547a
18e7668
60fbe57
ddd6bc5
90c5de7
c53f3d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
import signal | ||
|
||
import gsm | ||
import trio | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,27 +10,50 @@ force-exclude = ''' | |
[tool.codespell] | ||
ignore-words-list = 'astroid,crasher,asend' | ||
|
||
[tool.flake8] | ||
extend-ignore = ['D', 'E', 'W', 'F403', 'F405', 'F821', 'F822'] | ||
per-file-ignores = [ | ||
'trio/__init__.py: F401', | ||
'trio/_core/__init__.py: F401', | ||
'trio/_core/_tests/test_multierror_scripts/*: F401', | ||
'trio/abc.py: F401', | ||
'trio/lowlevel.py: F401', | ||
'trio/socket.py: F401', | ||
'trio/testing/__init__.py: F401' | ||
[tool.ruff] | ||
target-version = "py38" | ||
respect-gitignore = true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note this is the default behavior There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought it would be better to have at least some of the defaults set manually for if said settings are ever changed in a future PR. |
||
fix = true | ||
|
||
allowed-confusables = ["–"] | ||
|
||
# The directories to consider when resolving first vs. third-party imports. | ||
# Does not control what files to include/exclude! | ||
src = ["trio", "notes-to-self"] | ||
|
||
select = [ | ||
"RUF", # Ruff-specific rules | ||
"E", # Error | ||
"F", # pyflakes | ||
"I", # isort | ||
"YTT", # flake8-2020 | ||
] | ||
extend-ignore = [ | ||
'F403', # undefined-local-with-import-star | ||
'F405', # undefined-local-with-import-star-usage | ||
'E402', # module-import-not-at-top-of-file (usually OS-specific) | ||
'E501', # line-too-long | ||
] | ||
|
||
include = ["*.py", "*.pyi", "**/pyproject.toml"] | ||
|
||
[tool.isort] | ||
combine_as_imports = true | ||
profile = "black" | ||
skip_gitignore = true | ||
skip_glob = [ | ||
extend-exclude = [ | ||
"docs/source/reference-*", | ||
"docs/source/tutorial/*" | ||
"docs/source/tutorial/*", | ||
] | ||
A5rocks marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[tool.ruff.per-file-ignores] | ||
'trio/__init__.py' = ['F401'] | ||
'trio/_core/__init__.py' = ['F401'] | ||
'trio/_core/_tests/test_multierror_scripts/*' = ['F401'] | ||
'trio/abc.py' = ['F401'] | ||
'trio/lowlevel.py' = ['F401'] | ||
'trio/socket.py' = ['F401'] | ||
'trio/testing/__init__.py' = ['F401'] | ||
|
||
[tool.ruff.isort] | ||
combine-as-imports = true | ||
|
||
[tool.mypy] | ||
python_version = "3.8" | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If being a stickler I'd remove all the instances of generating/removing
py.typed
in a dedicated PR.