mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-25 11:07:17 +08:00
Doc: Use proper name capitalization of tooling (Ruff, Black, Flake8) (#10913)
This commit is contained in:
@@ -3,7 +3,7 @@ line_length = 130
|
||||
target_version = ["py310"]
|
||||
skip_magic_trailing_comma = true
|
||||
# Exclude protobuf files because they have long line lengths
|
||||
# Ideally, we could configure black to allow longer line lengths
|
||||
# Ideally, we could configure Black to allow longer line lengths
|
||||
# for just these files, but doesn't seem possible yet.
|
||||
force-exclude = ".*_pb2.pyi"
|
||||
|
||||
@@ -13,8 +13,8 @@ combine_as_imports = true
|
||||
line_length = 130
|
||||
skip = [".git", ".github", ".venv"]
|
||||
extra_standard_library = [
|
||||
"typing_extensions",
|
||||
"_typeshed",
|
||||
"typing_extensions",
|
||||
# Extra modules not recognized by isort
|
||||
"_ast",
|
||||
"_bisect",
|
||||
@@ -56,7 +56,7 @@ extra_standard_library = [
|
||||
"opcode",
|
||||
"pyexpat",
|
||||
]
|
||||
known_first_party = ["utils", "parse_metadata"]
|
||||
known_first_party = ["parse_metadata", "utils"]
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 130
|
||||
@@ -68,33 +68,33 @@ exclude = [
|
||||
# Ignore generated protobuf stubs
|
||||
"*_pb2.pyi",
|
||||
# virtual environment, cache directories, etc.:
|
||||
"env",
|
||||
".env",
|
||||
".venv",
|
||||
".git",
|
||||
".mypy_cache",
|
||||
".pytype",
|
||||
".venv",
|
||||
"env",
|
||||
]
|
||||
|
||||
# Only enable rules that have safe autofixes;
|
||||
# only enable rules that are relevant to stubs
|
||||
select = [
|
||||
"F401", # Remove unused imports
|
||||
"UP004", # Remove explicit `object` inheritance
|
||||
"UP006", # PEP-585 autofixes
|
||||
"UP007", # PEP-604 autofixes
|
||||
"UP013", # Class-based syntax for TypedDicts
|
||||
"UP014", # Class-based syntax for NamedTuples
|
||||
"UP019", # Use str over typing.Text
|
||||
"UP035", # import from typing, not typing_extensions, wherever possible
|
||||
"UP039", # don't use parens after a class definition with no bases
|
||||
"PYI009", # use `...`, not `pass`, in empty class bodies
|
||||
"PYI010", # function bodies must be empty
|
||||
"PYI012", # class bodies must not contain `pass`
|
||||
"PYI013", # non-empty class bodies must not contain `...`
|
||||
"PYI020", # quoted annotations are always unnecessary in stubs
|
||||
"PYI025", # always alias `collections.abc.Set` as `AbstractSet` when importing it
|
||||
"PYI032", # use `object`, not `Any`, as the second parameter to `__eq__`
|
||||
"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`
|
||||
"PYI013", # non-empty class bodies must not contain `...`
|
||||
"PYI020", # quoted annotations are always unnecessary in stubs
|
||||
"PYI025", # always alias `collections.abc.Set` as `AbstractSet` when importing it
|
||||
"PYI032", # use `object`, not `Any`, as the second parameter to `__eq__`
|
||||
"UP004", # Remove explicit `object` inheritance
|
||||
"UP006", # PEP-585 autofixes
|
||||
"UP007", # PEP-604 autofixes
|
||||
"UP013", # Class-based syntax for TypedDicts
|
||||
"UP014", # Class-based syntax for NamedTuples
|
||||
"UP019", # Use str over typing.Text
|
||||
"UP035", # import from typing, not typing_extensions, wherever possible
|
||||
"UP039", # don't use parens after a class definition with no bases
|
||||
]
|
||||
|
||||
[tool.typeshed]
|
||||
|
||||
Reference in New Issue
Block a user