Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
".pre-commit-config.yaml",
".prettierignore",
".readthedocs.yml",
".taplo.toml",
".vscode/*",
"CITATION.cff",
"codecov.yml",
Expand Down
52 changes: 23 additions & 29 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ ci:
- check-jsonschema
- mypy
- pyright
- tombi-format
- tombi-lint
- uv-lock

repos:
Expand All @@ -15,22 +17,9 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.8.13
rev: 0.9.3
hooks:
- id: check-dev-files
args:
- --doc-apt-packages=graphviz
- --repo-name=qrules
- --repo-title=QRules
- --type-checker=mypy
- --type-checker=pyright
- id: colab-toc-visible
- id: fix-nbformat-version
- id: remove-empty-tags
- id: set-nb-cells
args: [--autolink-concat]
- id: set-nb-display-name
- id: strip-nb-whitespace

- repo: https://github.com/kynan/nbstripout
rev: 0.9.1
Expand Down Expand Up @@ -60,8 +49,19 @@ repos:
metadata.varInspector
metadata.vscode

- repo: https://github.com/ComPWA/nbhooks
rev: 0.0.1
hooks:
- id: colab-toc-visible
- id: fix-nbformat-version
- id: remove-empty-tags
- id: set-nb-cells
args: [--autolink-concat]
- id: set-nb-display-name
- id: strip-nb-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.20
rev: v0.16.0
hooks:
- id: ruff-check
args: [--fix]
Expand Down Expand Up @@ -92,23 +92,18 @@ repos:
args: ["--django"]
- id: trailing-whitespace

- repo: https://github.com/tombi-toml/tombi-pre-commit
rev: v1.2.4
hooks:
- id: tombi-format
- id: tombi-lint
args: [--error-on-warnings]

- repo: https://github.com/ComPWA/prettier-pre-commit
rev: v3.8.1
hooks:
- id: prettier

- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format

- repo: https://github.com/pappasam/toml-sort
rev: v0.24.4
hooks:
- id: toml-sort
args:
- --in-place

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.4
hooks:
Expand All @@ -126,7 +121,6 @@ repos:
rev: v10.0.1
hooks:
- id: cspell
language_version: 25.9.0

- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 3.6.1
Expand Down Expand Up @@ -154,6 +148,6 @@ repos:
- id: pyright

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.11.26
rev: 0.12.0
hooks:
- id: uv-lock
22 changes: 0 additions & 22 deletions .taplo.toml

This file was deleted.

3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"soulcode.vscode-unwanted-extensions",
"stkb.rewrap",
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml",
"tombi-toml.tombi",
"yzhang.markdown-all-in-one"
],
"unwantedRecommendations": [
Expand All @@ -35,6 +35,7 @@
"ms-python.pylint",
"ms-toolsai.vscode-jupyter-slideshow",
"ryanluker.vscode-coverage-gutters",
"tamasfe.even-better-toml",
"travisillig.vscode-json-stable-stringify",
"tyriar.sort-lines"
]
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.rulers": [88]
},
"[toml]": {
"editor.defaultFormatter": "tombi-toml.tombi"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
Expand Down
6 changes: 3 additions & 3 deletions docs/_extend_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def extend_create_n_body_topology() -> None:
)


def extend_Topology() -> None: # noqa: N802
def extend_Topology() -> None: # ruff: ignore[invalid-function-name]
from qrules.topology import Topology, create_isobar_topologies

topologies = create_isobar_topologies(number_of_final_states=3)
Expand All @@ -102,7 +102,7 @@ def _append_to_docstring(class_type: Callable | type, appended_text: str) -> Non
_IMAGE_DIR = "_images"


def _graphviz_to_image( # noqa: PLR0917
def _graphviz_to_image( # ruff: ignore[too-many-positional-arguments]
dot: str,
options: dict[str, str] | None = None,
format: str = "svg",
Expand All @@ -114,7 +114,7 @@ def _graphviz_to_image( # noqa: PLR0917

if options is None:
options = {}
global _GRAPHVIZ_COUNTER # noqa: PLW0603
global _GRAPHVIZ_COUNTER # ruff: ignore[global-statement]
output_file = f"graphviz_{_GRAPHVIZ_COUNTER}"
_GRAPHVIZ_COUNTER += 1 # pyright: ignore[reportConstantRedefinition]
graphviz.Source(dot).render(f"{_IMAGE_DIR}/{output_file}", format=format)
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from qrules.quantum_numbers import EdgeQuantumNumbers, NodeQuantumNumbers

sys.path.insert(0, os.path.abspath("."))
from _extend_docstrings import extend_docstrings # noqa: PLC2701
from _extend_docstrings import extend_docstrings # ruff: ignore[import-private-name]


def __get_newtypes(some_type: type) -> list:
Expand Down
Loading
Loading