Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 1, 2024
1 parent cbaebcb commit f85d61b
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 24 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
],
"ignorePaths": [
"**/*.bib",
"**/*.rst_t",
"**/.cspell.json",
".constraints/*.txt",
".editorconfig",
Expand Down
1 change: 1 addition & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tasks:
- init: pyenv local 3.8
- init: pip install -c .constraints/py3.8.txt -e .[dev]

github:
Expand Down
24 changes: 12 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
19 changes: 14 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"editor.formatOnSave": false
},
"[git-commit]": {
"editor.rulers": [72],
"editor.rulers": [
72
],
"rewrap.wrappingColumn": 72
},
"[json]": {
Expand All @@ -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"
Expand All @@ -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,
Expand Down
4 changes: 1 addition & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ ignore-names = [
"PLW0603",
"PLW2901",
"S101",
"T201",
"T20",
"TCH00",
]
"docs/*" = [
Expand All @@ -310,6 +310,7 @@ ignore-names = [
"PLR0913",
"PLR2004",
"S101",
"T20",
]

[tool.ruff.pydocstyle]
Expand Down
6 changes: 3 additions & 3 deletions src/ampform_dpd/dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(

Check warning on line 183 in src/ampform_dpd/dynamics.py

View check run for this annotation

Codecov / codecov/patch

src/ampform_dpd/dynamics.py#L183

Added line #L183 was not covered by tests
*[(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)
Expand Down

0 comments on commit f85d61b

Please sign in to comment.