forked from Mirror/pmbootstrap
ruff: enable docstring format and set target version (MR 2252)
Allow automatic formatting of docstrings. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
1f249529f7
commit
139c205424
1 changed files with 11 additions and 1 deletions
|
@ -29,10 +29,20 @@ version = {attr = "pmb.__version__"}
|
||||||
exclude = ["aports", "docs", "keys", "test", "test.pmb_test"]
|
exclude = ["aports", "docs", "keys", "test", "test.pmb_test"]
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
|
line-length=100
|
||||||
|
# Assume Python 3.8
|
||||||
|
target-version = "py38"
|
||||||
# E402: module import not on top of file, not possible for testcases
|
# E402: module import not on top of file, not possible for testcases
|
||||||
# E722: do not use bare except
|
# E722: do not use bare except
|
||||||
lint.ignore=["E402", "E722"]
|
lint.ignore=["E402", "E722"]
|
||||||
line-length=100
|
|
||||||
|
[tool.ruff.lint.extend-per-file-ignores]
|
||||||
|
# F401: imported but unused, common for __init__.py files
|
||||||
|
"__init__.py" = ["F401"]
|
||||||
|
|
||||||
|
[tool.ruff.format]
|
||||||
|
# Enable auto-formatting of code examples in docstrings.
|
||||||
|
docstring-code-format = true
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
addopts = [
|
addopts = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue