Add pydocstyle/flake8-docstrings rules to ruff.

This commit is contained in:
Andrey Rakhmatullin 2024-12-01 12:12:13 +05:00
parent e53d6f09bc
commit d6bf1464b8
1 changed files with 37 additions and 0 deletions

View File

@ -240,6 +240,8 @@ extend-select = [
"B",
# flake8-comprehensions
"C4",
# pydocstyle
"D",
# flake8-debugger
"T10",
]
@ -260,6 +262,38 @@ ignore = [
"B028",
# Within an `except` clause, raise exceptions with `raise ... from`
"B904",
# Missing docstring in public module
"D100",
# Missing docstring in public class
"D101",
# Missing docstring in public method
"D102",
# Missing docstring in public function
"D103",
# Missing docstring in public package
"D104",
# Missing docstring in magic method
"D105",
# Missing docstring in public nested class
"D106",
# Missing docstring in __init__
"D107",
# One-line docstring should fit on one line with quotes
"D200",
# No blank lines allowed after function docstring
"D202",
# 1 blank line required between summary line and description
"D205",
# Multi-line docstring closing quotes should be on a separate line
"D209",
# First line should end with a period
"D400",
# First line should be in imperative mood; try rephrasing
"D401",
# First line should not be the function's "signature"
"D402",
# First word of the first line should be properly capitalized
"D403",
]
[tool.ruff.lint.per-file-ignores]
@ -276,3 +310,6 @@ ignore = [
"scrapy/utils/url.py" = ["F403", "F405"]
"tests/CrawlerRunner/change_reactor.py" = ["E402"]
"tests/test_loader.py" = ["E741"]
[tool.ruff.lint.pydocstyle]
convention = "pep257"