mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
101 lines
2.6 KiB
TOML
101 lines
2.6 KiB
TOML
[tool.black]
|
|
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
|
|
# 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 = [
|
|
"typing_extensions",
|
|
"_typeshed",
|
|
# Extra modules not recognized by isort
|
|
"_ast",
|
|
"_bisect",
|
|
"_bootlocale",
|
|
"_codecs",
|
|
"_collections_abc",
|
|
"_compat_pickle",
|
|
"_compression",
|
|
"_csv",
|
|
"_ctypes",
|
|
"_curses",
|
|
"_decimal",
|
|
"_dummy_thread",
|
|
"_dummy_threading",
|
|
"_heapq",
|
|
"_imp",
|
|
"_json",
|
|
"_markupbase",
|
|
"_msi",
|
|
"_operator",
|
|
"_osx_support",
|
|
"_posixsubprocess",
|
|
"_py_abc",
|
|
"_pydecimal",
|
|
"_random",
|
|
"_sitebuiltins",
|
|
"_socket",
|
|
"_stat",
|
|
"_thread",
|
|
"_threading_local",
|
|
"_tkinter",
|
|
"_tracemalloc",
|
|
"_warnings",
|
|
"_weakref",
|
|
"_weakrefset",
|
|
"_winapi",
|
|
"genericpath",
|
|
"opcode",
|
|
"pyexpat",
|
|
]
|
|
known_first_party = ["utils", "parse_metadata"]
|
|
|
|
[tool.ruff]
|
|
line-length = 130
|
|
target-version = "py37"
|
|
fix = true
|
|
exclude = [
|
|
# We're only interested in autofixes for our stubs
|
|
"*.py",
|
|
# Ignore generated protobuf stubs
|
|
"*_pb2.pyi",
|
|
# virtual environment, cache directories, etc.:
|
|
"env",
|
|
".env",
|
|
".venv",
|
|
".git",
|
|
".mypy_cache",
|
|
".pytype",
|
|
]
|
|
|
|
# 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__`
|
|
]
|
|
|
|
[tool.typeshed]
|
|
pyright_version = "1.1.325"
|