diff --git a/.cspell.json b/.cspell.json index 4701468a..9b743ec2 100644 --- a/.cspell.json +++ b/.cspell.json @@ -14,6 +14,7 @@ ], "ignorePaths": [ "**/*.bib", + "**/*.rst_t", "**/.cspell.json", ".constraints/*.txt", ".editorconfig", diff --git a/.gitpod.yml b/.gitpod.yml index 94274fb1..f0a7e46d 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,4 +1,5 @@ tasks: + - init: pyenv local 3.8 - init: pip install -c .constraints/py3.8.txt -e .[dev] github: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ff50419a..1074409a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,6 +12,18 @@ repos: - id: check-hooks-apply - id: check-useless-excludes + - repo: https://github.com/ComPWA/repo-maintenance + rev: 0.1.11 + hooks: + - id: check-dev-files + args: + - --doc-apt-packages=graphviz + - --no-prettierrc + - --pin-requirements=bimonthly + - --repo-name=ampform-dpd + - --repo-title=AmpForm-DPD + - id: colab-toc-visible + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: @@ -27,18 +39,6 @@ repos: - id: mixed-line-ending - id: trailing-whitespace - - repo: https://github.com/ComPWA/repo-maintenance - rev: 0.1.11 - hooks: - - id: check-dev-files - args: - - --doc-apt-packages=graphviz - - --no-prettierrc - - --pin-requirements=bimonthly - - --repo-name=ampform-dpd - - --repo-title=AmpForm-DPD - - id: colab-toc-visible - - repo: https://github.com/psf/black-pre-commit-mirror rev: 23.12.1 hooks: diff --git a/.vscode/settings.json b/.vscode/settings.json index 714f0b93..6dbbbc0c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,7 +3,9 @@ "editor.formatOnSave": false }, "[git-commit]": { - "editor.rulers": [72], + "editor.rulers": [ + 72 + ], "rewrap.wrappingColumn": 72 }, "[json]": { @@ -21,10 +23,12 @@ }, "[python]": { "editor.codeActionsOnSave": { - "source.organizeImports": true + "source.organizeImports": "explicit" }, "editor.defaultFormatter": "ms-python.black-formatter", - "editor.rulers": [88] + "editor.rulers": [ + 88 + ] }, "[yaml]": { "editor.defaultFormatter": "esbenp.prettier-vscode" @@ -34,13 +38,18 @@ "diffEditor.experimental.showMoves": true, "editor.formatOnSave": true, "files.eol": "\n", - "github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"], + "github-actions.workflows.pinned.workflows": [ + ".github/workflows/ci.yml" + ], "livePreview.defaultPreviewPath": "docs/_build/html", + "multiDiffEditor.experimental.enabled": true, "notebook.gotoSymbols.showAllSymbols": true, "python.analysis.autoImportCompletions": false, "python.analysis.inlayHints.pytestParameters": true, "python.analysis.typeCheckingMode": "strict", - "python.testing.pytestArgs": ["--color=no"], + "python.testing.pytestArgs": [ + "--color=no" + ], "python.testing.pytestEnabled": true, "python.testing.unittestEnabled": false, "rewrap.wrappingColumn": 88, diff --git a/environment.yml b/environment.yml index 51a3ec55..17c7d794 100644 --- a/environment.yml +++ b/environment.yml @@ -6,9 +6,7 @@ dependencies: - python==3.8.* - pip - pip: - - | - -c .constraints/py3.8.txt - -e .[dev] + - -c .constraints/py3.8.txt -e .[dev] variables: PRETTIER_LEGACY_CLI: "1" PYTHONHASHSEED: 0 diff --git a/pyproject.toml b/pyproject.toml index 33878777..a9f75437 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -291,7 +291,7 @@ ignore-names = [ "PLW0603", "PLW2901", "S101", - "T201", + "T20", "TCH00", ] "docs/*" = [ @@ -310,6 +310,7 @@ ignore-names = [ "PLR0913", "PLR2004", "S101", + "T20", ] [tool.ruff.pydocstyle] diff --git a/src/ampform_dpd/dynamics.py b/src/ampform_dpd/dynamics.py index c2d4c7bf..35c83818 100644 --- a/src/ampform_dpd/dynamics.py +++ b/src/ampform_dpd/dynamics.py @@ -180,9 +180,9 @@ def evaluate(self) -> sp.Piecewise: 1: 1 / (1 + z**2), 2: 1 / (9 + 3 * z**2 + z**4), } - return sp.Piecewise(*[ - (sp.sqrt(expr), sp.Eq(L, l_val)) for l_val, expr in cases.items() - ]) + return sp.Piecewise( + *[(sp.sqrt(expr), sp.Eq(L, l_val)) for l_val, expr in cases.items()] + ) def _latex(self, printer, *args): z, L = map(printer._print, self.args)