mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-30 14:45:23 +08:00
Replace isort with Ruff (#10912)
This commit is contained in:
@@ -7,15 +7,13 @@ skip_magic_trailing_comma = true
|
||||
# for just these files, but doesn't seem possible yet.
|
||||
force-exclude = ".*_pb2.pyi"
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
combine_as_imports = true
|
||||
line_length = 130
|
||||
skip = [".git", ".github", ".venv"]
|
||||
extra_standard_library = [
|
||||
[tool.ruff.isort]
|
||||
split-on-trailing-comma = false
|
||||
combine-as-imports = true
|
||||
extra-standard-library = [
|
||||
"_typeshed",
|
||||
"typing_extensions",
|
||||
# Extra modules not recognized by isort
|
||||
# Extra modules not recognized by Ruff/isort
|
||||
"_ast",
|
||||
"_bisect",
|
||||
"_bootlocale",
|
||||
@@ -56,7 +54,7 @@ extra_standard_library = [
|
||||
"opcode",
|
||||
"pyexpat",
|
||||
]
|
||||
known_first_party = ["parse_metadata", "utils"]
|
||||
known-first-party = ["parse_metadata", "utils"]
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 130
|
||||
@@ -75,12 +73,11 @@ exclude = [
|
||||
".venv",
|
||||
"env",
|
||||
]
|
||||
|
||||
# Only enable rules that have safe autofixes;
|
||||
# only enable rules that are relevant to stubs
|
||||
select = [
|
||||
"F401", # Remove unused imports
|
||||
"FA", # flake8-future-annotations
|
||||
"I", # isort
|
||||
# Only enable rules that have safe autofixes:
|
||||
"F401", # Remove unused imports
|
||||
"PYI009", # use `...`, not `pass`, in empty class bodies
|
||||
"PYI010", # function bodies must be empty
|
||||
"PYI012", # class bodies must not contain `pass`
|
||||
|
||||
Reference in New Issue
Block a user