mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-30 14:45:23 +08:00
Forbid extremely long line lengths in non-autogenerated stubs (#12537)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -3,6 +3,7 @@ line-length = 130
|
||||
target-version = ["py310"]
|
||||
skip-magic-trailing-comma = true
|
||||
# Exclude protobuf files because they have long line lengths
|
||||
# that can't be autofixed. Like docstrings and import aliases.
|
||||
# Ideally, we could configure Black to allow longer line lengths
|
||||
# for just these files, but doesn't seem possible yet.
|
||||
force-exclude = ".*_pb2.pyi"
|
||||
@@ -91,13 +92,16 @@ ignore = [
|
||||
# B033 could be slightly useful but Ruff doesn't have per-file select
|
||||
"B", # flake8-bugbear
|
||||
# Rules that are out of the control of stub authors:
|
||||
"E501", # Line too long
|
||||
"E741", # ambiguous variable name
|
||||
"F403", # `from . import *` used; unable to detect undefined names
|
||||
# Stubs can sometimes re-export entire modules.
|
||||
# Issues with using a star-imported name will be caught by type-checkers.
|
||||
"F405", # may be undefined, or defined from star imports
|
||||
]
|
||||
# See comment on black's force-exclude config above
|
||||
"*_pb2.pyi" = [
|
||||
"E501", # Line too long
|
||||
]
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
split-on-trailing-comma = false
|
||||
|
||||
Reference in New Issue
Block a user