Skip to content

Commit

Permalink
Autoformat the example scripts in all docstrings (#217)
Browse files Browse the repository at this point in the history
* Autoupdate the pre-commit hook

* Autoformat the docstring-examples via ruff
  • Loading branch information
pnkraemer authored Sep 10, 2024
1 parent 2406b9f commit d3fa8be
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
- id: check-merge-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.2
rev: v0.6.4
hooks:
# Run the linter.
- id: ruff
Expand Down
1 change: 0 additions & 1 deletion matfree/bounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def baigolub96_logdet_spd(bound_spectrum, /, nrows, trace, norm_frobenius_square
publisher={Citeseer}
}
```
"""
mu1, mu2 = trace, norm_frobenius_squared
beta = bound_spectrum
Expand Down
1 change: 0 additions & 1 deletion matfree/decomp.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ def hessenberg(
year={2024}
}
```
"""
reortho_expected = ["none", "full"]
if reortho not in reortho_expected:
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ select = [
# Docstrings:
"D",
]

ignore = [
# warning: `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible.
"D203",
Expand All @@ -126,8 +127,10 @@ line-ending = "lf"
# Prefer single quotes over double quotes.
quote-style = "double"
skip-magic-trailing-comma = true
docstring-code-format = true
docstring-code-line-length = "dynamic"

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
# Ignore all directories named `tests`.
"tests/**" = ["D"]
"matfree/backend/**" = ["D"]
Expand Down

0 comments on commit d3fa8be

Please sign in to comment.