mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
@@ -135,6 +135,54 @@ exclude = [
|
||||
[tool.isort]
|
||||
line_length = 95
|
||||
|
||||
[tool.ruff]
|
||||
target-version = "py38" # Pin Ruff to Python 3.8
|
||||
line-length = 95
|
||||
exclude = [
|
||||
'.git',
|
||||
'.tox',
|
||||
'.venv',
|
||||
'tests/roots/*',
|
||||
'build/*',
|
||||
'doc/_build/*',
|
||||
'sphinx/search/*',
|
||||
'doc/usage/extensions/example*.py',
|
||||
]
|
||||
ignore = [
|
||||
# pycodestyle
|
||||
'E741',
|
||||
# flake8-bugbear
|
||||
'B006',
|
||||
'B023',
|
||||
# flake8-bugbear opinionated (disabled by default in flake8)
|
||||
'B904',
|
||||
'B905',
|
||||
]
|
||||
external = [ # Whitelist for RUF100 unkown code warnings
|
||||
"E704",
|
||||
"W291",
|
||||
"W293",
|
||||
]
|
||||
select = [
|
||||
"E", # pycodestyle
|
||||
"F", # Pyflakes
|
||||
"W", # pycodestyle
|
||||
# plugins:
|
||||
"B", # flake8-bugbear
|
||||
"C4", # flake8-comprehensions
|
||||
"SIM", # flake8-simplify
|
||||
"RUF100" # yesqa
|
||||
]
|
||||
|
||||
[tool.ruff.per-file-ignores]
|
||||
"tests/*" = ["E501"]
|
||||
"sphinx/environment/collectors/toctree.py" = ["B026"]
|
||||
"sphinx/environment/adapters/toctree.py" = ["B026"]
|
||||
|
||||
# Ruff does not support 'import-order-style = smarkets'
|
||||
"sphinx/util/__init__.py" = ["F401"]
|
||||
"sphinx/util/inspect.py" = ["F401"]
|
||||
|
||||
[tool.mypy]
|
||||
check_untyped_defs = true
|
||||
disallow_incomplete_defs = true
|
||||
|
||||
Reference in New Issue
Block a user