Skip to content

Commit b41b731

Browse files
committed
[IMP] lint docstrings
Now that we have documentation, better if it's correctly formatted. Part-of: #66
1 parent 918d68a commit b41b731

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ line-length = 120
3333
ignore = [
3434
"B904", # raise-without-from-inside-except; not python2 compatible
3535
"B905", # zip-without-explicit-strict; not python2 compatible
36+
"D1", # undocumented-*
3637
"E501", # line-too-long; handled by auto-formatting
3738
"E731", # lambda-assignment
3839
"PERF203", # try-except-in-loop
@@ -58,6 +59,7 @@ select = [
5859
"A", # flake8-builtins
5960
"B", # flake8-bugbear
6061
"C4", # flake8-comprehensions
62+
"D", # pydocstyle
6163
"E", # pycodestyle
6264
"ERA", # eradicate
6365
"F", # Pyflakes
@@ -92,6 +94,8 @@ known-local-folder = ["odoo.upgrade", "odoo.addons.base.maintenance.migrations",
9294
[tool.ruff.lint.isort.sections]
9395
odoo-addons = ["odoo.addons", "openerp.addons"]
9496

97+
[tool.ruff.lint.pydocstyle]
98+
convention = "pep257"
9599

96100
[tool.ruff.lint.per-file-ignores]
97101
"*/__init__.py" = [
@@ -103,3 +107,7 @@ odoo-addons = ["odoo.addons", "openerp.addons"]
103107
"RUF005",
104108
"RUF007",
105109
]
110+
# ignore docstring lint for tests files
111+
"src/*/tests/*.py" = ["D"]
112+
# and for upgrade scripts
113+
"src/*/*/{pre,post,end}-*.py" = ["D"]

0 commit comments

Comments
 (0)