From 81b3909fad87c0043233e5c42bbef455a7bb4e37 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:17:05 +0100 Subject: [PATCH] MAINT: update pip constraints and pre-commit (#395) * DX: update and apply new ComPWA policy * MAINT: address Ruff linting issues * MAINT: apply auto Ruff preview rules --------- Co-authored-by: GitHub Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .constraints/py3.10.txt | 100 +++++++++--------- .constraints/py3.11.txt | 100 +++++++++--------- .constraints/py3.12.txt | 100 +++++++++--------- .constraints/py3.7.txt | 29 ++--- .constraints/py3.8.txt | 82 +++++++------- .constraints/py3.9.txt | 98 +++++++++-------- .github/dependabot.yml | 10 -- .github/workflows/ci.yml | 3 +- .github/workflows/release-drafter.yml | 2 +- .github/workflows/requirements.yml | 3 +- .gitpod.yml | 3 +- .pre-commit-config.yaml | 94 ++++++++-------- .vscode/extensions.json | 6 +- .vscode/settings.json | 7 +- docs/conf.py | 2 +- docs/usage/amplitude.ipynb | 1 + docs/usage/dynamics.ipynb | 1 + .../dynamics/analytic-continuation.ipynb | 1 + docs/usage/dynamics/custom.ipynb | 1 + docs/usage/dynamics/k-matrix.ipynb | 2 +- docs/usage/interactive.ipynb | 3 +- docs/usage/symplot.ipynb | 3 +- docs/usage/sympy.ipynb | 1 + pyproject.toml | 49 +++++++-- src/ampform/__init__.py | 2 +- src/ampform/dynamics/__init__.py | 2 +- src/ampform/dynamics/kmatrix.py | 8 +- src/ampform/helicity/__init__.py | 18 ++-- src/ampform/helicity/naming.py | 2 +- src/ampform/kinematics/lorentz.py | 2 +- src/ampform/sympy/__init__.py | 6 +- src/ampform/sympy/_array_expressions.py | 4 +- src/ampform/sympy/_decorator.py | 2 +- tests/dynamics/test_deprecated.py | 2 +- tests/dynamics/test_kmatrix.py | 2 +- tests/kinematics/conftest.py | 2 +- tests/kinematics/test_angles.py | 2 +- tests/kinematics/test_lorentz.py | 2 +- tests/symplot/test_symplot.py | 2 +- tests/sympy/test_caching.py | 2 +- 40 files changed, 406 insertions(+), 355 deletions(-) delete mode 100644 .github/dependabot.yml diff --git a/.constraints/py3.10.txt b/.constraints/py3.10.txt index a2bc06f72..a484bd27e 100644 --- a/.constraints/py3.10.txt +++ b/.constraints/py3.10.txt @@ -14,12 +14,12 @@ asttokens==2.4.1 async-lru==2.0.4 attrs==23.2.0 babel==2.14.0 -beautifulsoup4==4.12.2 -black==23.12.1 +beautifulsoup4==4.12.3 +black==24.1.1 bleach==6.1.0 cachetools==5.3.2 cattrs==23.2.3 -certifi==2023.11.17 +certifi==2024.2.2 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 @@ -28,9 +28,9 @@ click==8.1.7 colorama==0.4.6 comm==0.2.1 contourpy==1.2.0 -coverage==7.4.0 +coverage==7.4.1 cycler==0.12.1 -debugpy==1.8.0 +debugpy==1.8.1 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 @@ -41,54 +41,57 @@ execnet==2.0.2 executing==2.0.1 fastjsonschema==2.19.1 filelock==3.13.1 -fonttools==4.47.2 +fonttools==4.48.1 fqdn==1.5.1 gitdb==4.0.11 gitpython==3.1.41 gprof2dot==2022.7.29 graphviz==0.20.1 greenlet==3.0.3 +h11==0.14.0 hepunits==2.3.3 -identify==2.5.33 +httpcore==1.0.2 +httpx==0.26.0 +identify==2.5.34 idna==3.6 imagesize==1.4.1 importlib-metadata==7.0.1 iniconfig==2.0.0 -ipykernel==6.28.0 +ipykernel==6.29.2 ipympl==0.9.3 -ipython==8.20.0 +ipython==8.21.0 ipython-genutils==0.2.0 -ipywidgets==8.1.1 +ipywidgets==8.1.2 isoduration==20.11.0 isort==5.13.2 jedi==0.19.1 jinja2==3.1.3 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.20.0 +jsonschema==4.21.1 jsonschema-specifications==2023.12.1 jupyter-cache==1.0.0 jupyter-client==8.6.0 jupyter-core==5.7.1 jupyter-events==0.9.0 -jupyter-lsp==2.2.1 -jupyter-server==2.12.4 +jupyter-lsp==2.2.2 +jupyter-server==2.12.5 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.5.1 -jupyterlab==4.0.10 +jupyter-server-terminals==0.5.2 +jupyterlab==4.1.0 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 -jupyterlab-lsp==5.0.1 +jupyterlab-lsp==5.0.3 jupyterlab-myst==2.1.0 jupyterlab-pygments==0.3.0 jupyterlab-server==2.25.2 -jupyterlab-widgets==3.0.9 +jupyterlab-widgets==3.0.10 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 lsprotocol==2023.0.1 markdown-it-py==3.0.0 -markupsafe==2.1.3 +markupsafe==2.1.5 matplotlib==3.8.2 matplotlib-inline==0.1.6 mdit-py-plugins==0.4.0 @@ -101,38 +104,38 @@ mypy-extensions==1.0.0 myst-nb==1.0.0 myst-parser==2.0.0 nbclient==0.6.8 -nbconvert==7.14.1 +nbconvert==7.16.0 nbdime==4.0.1 nbformat==5.9.2 -nbmake==1.4.6 -nest-asyncio==1.5.8 +nbmake==1.5.0 +nest-asyncio==1.6.0 nodeenv==1.8.0 notebook-shim==0.2.3 -numpy==1.26.3 -overrides==7.4.0 +numpy==1.26.4 +overrides==7.7.0 packaging==23.2 -pandocfilters==1.5.0 +pandocfilters==1.5.1 parso==0.8.3 particle==0.23.1 pathspec==0.12.1 pexpect==4.9.0 pillow==10.2.0 -platformdirs==4.1.0 -pluggy==1.3.0 -pre-commit==3.6.0 +platformdirs==4.2.0 +pluggy==1.4.0 +pre-commit==3.6.1 prometheus-client==0.19.0 prompt-toolkit==3.0.43 -psutil==5.9.7 +psutil==5.9.8 ptyprocess==0.7.0 pure-eval==0.2.2 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydata-sphinx-theme==0.15.1 +pydata-sphinx-theme==0.15.2 pygments==2.17.2 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.4 +pytest==8.0.0 pytest-cov==4.1.0 pytest-profiling==1.7.0 pytest-xdist==3.5.0 @@ -140,20 +143,21 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.0.2 -python-lsp-server==1.9.0 +python-lsp-ruff==2.1.0 +python-lsp-server==1.10.0 pytoolconfig==1.3.1 pyyaml==6.0.1 pyzmq==25.1.2 qrules==0.9.8 -referencing==0.32.1 +referencing==0.33.0 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.0 -rope==1.11.0 -rpds-py==0.16.2 -ruff==0.1.13 +rope==1.12.0 +rpds-py==0.17.1 +ruff==0.2.1 +scipy==1.12.0 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 @@ -162,7 +166,7 @@ snowballstemmer==2.2.0 soupsieve==2.5 sphinx==7.2.6 sphinx-api-relink==0.0.8 -sphinx-autobuild==2021.3.14 +sphinx-autobuild==2024.2.4 sphinx-book-theme==1.1.0 sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 @@ -170,16 +174,16 @@ sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-hep-pdgref==0.2.0 sphinx-pybtex-etal-style==0.0.2 -sphinx-thebe==0.3.0 +sphinx-thebe==0.3.1 sphinx-togglebutton==0.3.2 -sphinxcontrib-applehelp==1.0.7 +sphinxcontrib-applehelp==1.0.8 sphinxcontrib-bibtex==2.6.2 -sphinxcontrib-devhelp==1.0.5 -sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-devhelp==1.0.6 +sphinxcontrib-htmlhelp==2.0.5 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.6 -sphinxcontrib-serializinghtml==1.1.9 -sqlalchemy==2.0.25 +sphinxcontrib-qthelp==1.0.7 +sphinxcontrib-serializinghtml==1.1.10 +sqlalchemy==2.0.26 stack-data==0.6.3 sympy==1.12 tabulate==0.9.0 @@ -187,21 +191,21 @@ terminado==0.18.0 tinycss2==1.2.1 tomli==2.0.1 tornado==6.4 -tox==4.12.0 -tqdm==4.66.1 +tox==4.12.1 +tqdm==4.66.2 traitlets==5.14.1 types-python-dateutil==2.8.19.20240106 typing-extensions==4.9.0 ujson==5.9.0 uri-template==1.3.0 -urllib3==2.1.0 +urllib3==2.2.0 virtualenv==20.25.0 wcwidth==0.2.13 webcolors==1.13 webencodings==0.5.1 websocket-client==1.7.0 wheel==0.42.0 -widgetsnbextension==4.0.9 +widgetsnbextension==4.0.10 zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: diff --git a/.constraints/py3.11.txt b/.constraints/py3.11.txt index e8fe3e8d7..13d1daeea 100644 --- a/.constraints/py3.11.txt +++ b/.constraints/py3.11.txt @@ -14,12 +14,12 @@ asttokens==2.4.1 async-lru==2.0.4 attrs==23.2.0 babel==2.14.0 -beautifulsoup4==4.12.2 -black==23.12.1 +beautifulsoup4==4.12.3 +black==24.1.1 bleach==6.1.0 cachetools==5.3.2 cattrs==23.2.3 -certifi==2023.11.17 +certifi==2024.2.2 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 @@ -28,9 +28,9 @@ click==8.1.7 colorama==0.4.6 comm==0.2.1 contourpy==1.2.0 -coverage==7.4.0 +coverage==7.4.1 cycler==0.12.1 -debugpy==1.8.0 +debugpy==1.8.1 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 @@ -40,54 +40,57 @@ execnet==2.0.2 executing==2.0.1 fastjsonschema==2.19.1 filelock==3.13.1 -fonttools==4.47.2 +fonttools==4.48.1 fqdn==1.5.1 gitdb==4.0.11 gitpython==3.1.41 gprof2dot==2022.7.29 graphviz==0.20.1 greenlet==3.0.3 +h11==0.14.0 hepunits==2.3.3 -identify==2.5.33 +httpcore==1.0.2 +httpx==0.26.0 +identify==2.5.34 idna==3.6 imagesize==1.4.1 importlib-metadata==7.0.1 iniconfig==2.0.0 -ipykernel==6.28.0 +ipykernel==6.29.2 ipympl==0.9.3 -ipython==8.20.0 +ipython==8.21.0 ipython-genutils==0.2.0 -ipywidgets==8.1.1 +ipywidgets==8.1.2 isoduration==20.11.0 isort==5.13.2 jedi==0.19.1 jinja2==3.1.3 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.20.0 +jsonschema==4.21.1 jsonschema-specifications==2023.12.1 jupyter-cache==1.0.0 jupyter-client==8.6.0 jupyter-core==5.7.1 jupyter-events==0.9.0 -jupyter-lsp==2.2.1 -jupyter-server==2.12.4 +jupyter-lsp==2.2.2 +jupyter-server==2.12.5 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.5.1 -jupyterlab==4.0.10 +jupyter-server-terminals==0.5.2 +jupyterlab==4.1.0 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 -jupyterlab-lsp==5.0.1 +jupyterlab-lsp==5.0.3 jupyterlab-myst==2.1.0 jupyterlab-pygments==0.3.0 jupyterlab-server==2.25.2 -jupyterlab-widgets==3.0.9 +jupyterlab-widgets==3.0.10 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 lsprotocol==2023.0.1 markdown-it-py==3.0.0 -markupsafe==2.1.3 +markupsafe==2.1.5 matplotlib==3.8.2 matplotlib-inline==0.1.6 mdit-py-plugins==0.4.0 @@ -100,38 +103,38 @@ mypy-extensions==1.0.0 myst-nb==1.0.0 myst-parser==2.0.0 nbclient==0.6.8 -nbconvert==7.14.1 +nbconvert==7.16.0 nbdime==4.0.1 nbformat==5.9.2 -nbmake==1.4.6 -nest-asyncio==1.5.8 +nbmake==1.5.0 +nest-asyncio==1.6.0 nodeenv==1.8.0 notebook-shim==0.2.3 -numpy==1.26.3 -overrides==7.4.0 +numpy==1.26.4 +overrides==7.7.0 packaging==23.2 -pandocfilters==1.5.0 +pandocfilters==1.5.1 parso==0.8.3 particle==0.23.1 pathspec==0.12.1 pexpect==4.9.0 pillow==10.2.0 -platformdirs==4.1.0 -pluggy==1.3.0 -pre-commit==3.6.0 +platformdirs==4.2.0 +pluggy==1.4.0 +pre-commit==3.6.1 prometheus-client==0.19.0 prompt-toolkit==3.0.43 -psutil==5.9.7 +psutil==5.9.8 ptyprocess==0.7.0 pure-eval==0.2.2 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydata-sphinx-theme==0.15.1 +pydata-sphinx-theme==0.15.2 pygments==2.17.2 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.4 +pytest==8.0.0 pytest-cov==4.1.0 pytest-profiling==1.7.0 pytest-xdist==3.5.0 @@ -139,20 +142,21 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.0.2 -python-lsp-server==1.9.0 +python-lsp-ruff==2.1.0 +python-lsp-server==1.10.0 pytoolconfig==1.3.1 pyyaml==6.0.1 pyzmq==25.1.2 qrules==0.9.8 -referencing==0.32.1 +referencing==0.33.0 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.0 -rope==1.11.0 -rpds-py==0.16.2 -ruff==0.1.13 +rope==1.12.0 +rpds-py==0.17.1 +ruff==0.2.1 +scipy==1.12.0 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 @@ -161,7 +165,7 @@ snowballstemmer==2.2.0 soupsieve==2.5 sphinx==7.2.6 sphinx-api-relink==0.0.8 -sphinx-autobuild==2021.3.14 +sphinx-autobuild==2024.2.4 sphinx-book-theme==1.1.0 sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 @@ -169,37 +173,37 @@ sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-hep-pdgref==0.2.0 sphinx-pybtex-etal-style==0.0.2 -sphinx-thebe==0.3.0 +sphinx-thebe==0.3.1 sphinx-togglebutton==0.3.2 -sphinxcontrib-applehelp==1.0.7 +sphinxcontrib-applehelp==1.0.8 sphinxcontrib-bibtex==2.6.2 -sphinxcontrib-devhelp==1.0.5 -sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-devhelp==1.0.6 +sphinxcontrib-htmlhelp==2.0.5 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.6 -sphinxcontrib-serializinghtml==1.1.9 -sqlalchemy==2.0.25 +sphinxcontrib-qthelp==1.0.7 +sphinxcontrib-serializinghtml==1.1.10 +sqlalchemy==2.0.26 stack-data==0.6.3 sympy==1.12 tabulate==0.9.0 terminado==0.18.0 tinycss2==1.2.1 tornado==6.4 -tox==4.12.0 -tqdm==4.66.1 +tox==4.12.1 +tqdm==4.66.2 traitlets==5.14.1 types-python-dateutil==2.8.19.20240106 typing-extensions==4.9.0 ujson==5.9.0 uri-template==1.3.0 -urllib3==2.1.0 +urllib3==2.2.0 virtualenv==20.25.0 wcwidth==0.2.13 webcolors==1.13 webencodings==0.5.1 websocket-client==1.7.0 wheel==0.42.0 -widgetsnbextension==4.0.9 +widgetsnbextension==4.0.10 zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: diff --git a/.constraints/py3.12.txt b/.constraints/py3.12.txt index 7ac61d2a7..d6225401d 100644 --- a/.constraints/py3.12.txt +++ b/.constraints/py3.12.txt @@ -14,12 +14,12 @@ asttokens==2.4.1 async-lru==2.0.4 attrs==23.2.0 babel==2.14.0 -beautifulsoup4==4.12.2 -black==23.12.1 +beautifulsoup4==4.12.3 +black==24.1.1 bleach==6.1.0 cachetools==5.3.2 cattrs==23.2.3 -certifi==2023.11.17 +certifi==2024.2.2 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 @@ -28,9 +28,9 @@ click==8.1.7 colorama==0.4.6 comm==0.2.1 contourpy==1.2.0 -coverage==7.4.0 +coverage==7.4.1 cycler==0.12.1 -debugpy==1.8.0 +debugpy==1.8.1 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 @@ -40,54 +40,57 @@ execnet==2.0.2 executing==2.0.1 fastjsonschema==2.19.1 filelock==3.13.1 -fonttools==4.47.2 +fonttools==4.48.1 fqdn==1.5.1 gitdb==4.0.11 gitpython==3.1.41 gprof2dot==2022.7.29 graphviz==0.20.1 greenlet==3.0.3 +h11==0.14.0 hepunits==2.3.3 -identify==2.5.33 +httpcore==1.0.2 +httpx==0.26.0 +identify==2.5.34 idna==3.6 imagesize==1.4.1 importlib-metadata==7.0.1 iniconfig==2.0.0 -ipykernel==6.28.0 +ipykernel==6.29.2 ipympl==0.9.3 -ipython==8.20.0 +ipython==8.21.0 ipython-genutils==0.2.0 -ipywidgets==8.1.1 +ipywidgets==8.1.2 isoduration==20.11.0 isort==5.13.2 jedi==0.19.1 jinja2==3.1.3 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.20.0 +jsonschema==4.21.1 jsonschema-specifications==2023.12.1 jupyter-cache==1.0.0 jupyter-client==8.6.0 jupyter-core==5.7.1 jupyter-events==0.9.0 -jupyter-lsp==2.2.1 -jupyter-server==2.12.4 +jupyter-lsp==2.2.2 +jupyter-server==2.12.5 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.5.1 -jupyterlab==4.0.10 +jupyter-server-terminals==0.5.2 +jupyterlab==4.1.0 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 -jupyterlab-lsp==5.0.1 +jupyterlab-lsp==5.0.3 jupyterlab-myst==2.1.0 jupyterlab-pygments==0.3.0 jupyterlab-server==2.25.2 -jupyterlab-widgets==3.0.9 +jupyterlab-widgets==3.0.10 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 lsprotocol==2023.0.1 markdown-it-py==3.0.0 -markupsafe==2.1.3 +markupsafe==2.1.5 matplotlib==3.8.2 matplotlib-inline==0.1.6 mdit-py-plugins==0.4.0 @@ -100,38 +103,38 @@ mypy-extensions==1.0.0 myst-nb==1.0.0 myst-parser==2.0.0 nbclient==0.6.8 -nbconvert==7.14.1 +nbconvert==7.16.0 nbdime==4.0.1 nbformat==5.9.2 -nbmake==1.4.6 -nest-asyncio==1.5.8 +nbmake==1.5.0 +nest-asyncio==1.6.0 nodeenv==1.8.0 notebook-shim==0.2.3 -numpy==1.26.3 -overrides==7.4.0 +numpy==1.26.4 +overrides==7.7.0 packaging==23.2 -pandocfilters==1.5.0 +pandocfilters==1.5.1 parso==0.8.3 particle==0.23.1 pathspec==0.12.1 pexpect==4.9.0 pillow==10.2.0 -platformdirs==4.1.0 -pluggy==1.3.0 -pre-commit==3.6.0 +platformdirs==4.2.0 +pluggy==1.4.0 +pre-commit==3.6.1 prometheus-client==0.19.0 prompt-toolkit==3.0.43 -psutil==5.9.7 +psutil==5.9.8 ptyprocess==0.7.0 pure-eval==0.2.2 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydata-sphinx-theme==0.15.1 +pydata-sphinx-theme==0.15.2 pygments==2.17.2 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.4 +pytest==8.0.0 pytest-cov==4.1.0 pytest-profiling==1.7.0 pytest-xdist==3.5.0 @@ -139,20 +142,21 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.0.2 -python-lsp-server==1.9.0 +python-lsp-ruff==2.1.0 +python-lsp-server==1.10.0 pytoolconfig==1.3.1 pyyaml==6.0.1 pyzmq==25.1.2 qrules==0.9.8 -referencing==0.32.1 +referencing==0.33.0 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.0 -rope==1.11.0 -rpds-py==0.16.2 -ruff==0.1.13 +rope==1.12.0 +rpds-py==0.17.1 +ruff==0.2.1 +scipy==1.12.0 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 @@ -161,7 +165,7 @@ snowballstemmer==2.2.0 soupsieve==2.5 sphinx==7.2.6 sphinx-api-relink==0.0.8 -sphinx-autobuild==2021.3.14 +sphinx-autobuild==2024.2.4 sphinx-book-theme==1.1.0 sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 @@ -169,37 +173,37 @@ sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-hep-pdgref==0.2.0 sphinx-pybtex-etal-style==0.0.2 -sphinx-thebe==0.3.0 +sphinx-thebe==0.3.1 sphinx-togglebutton==0.3.2 -sphinxcontrib-applehelp==1.0.7 +sphinxcontrib-applehelp==1.0.8 sphinxcontrib-bibtex==2.6.2 -sphinxcontrib-devhelp==1.0.5 -sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-devhelp==1.0.6 +sphinxcontrib-htmlhelp==2.0.5 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.6 -sphinxcontrib-serializinghtml==1.1.9 -sqlalchemy==2.0.25 +sphinxcontrib-qthelp==1.0.7 +sphinxcontrib-serializinghtml==1.1.10 +sqlalchemy==2.0.26 stack-data==0.6.3 sympy==1.12 tabulate==0.9.0 terminado==0.18.0 tinycss2==1.2.1 tornado==6.4 -tox==4.12.0 -tqdm==4.66.1 +tox==4.12.1 +tqdm==4.66.2 traitlets==5.14.1 types-python-dateutil==2.8.19.20240106 typing-extensions==4.9.0 ujson==5.9.0 uri-template==1.3.0 -urllib3==2.1.0 +urllib3==2.2.0 virtualenv==20.25.0 wcwidth==0.2.13 webcolors==1.13 webencodings==0.5.1 websocket-client==1.7.0 wheel==0.42.0 -widgetsnbextension==4.0.9 +widgetsnbextension==4.0.10 zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: diff --git a/.constraints/py3.7.txt b/.constraints/py3.7.txt index 7251602db..d2f6d5491 100644 --- a/.constraints/py3.7.txt +++ b/.constraints/py3.7.txt @@ -15,13 +15,13 @@ arrow==1.2.3 attrs==23.2.0 babel==2.14.0 backcall==0.2.0 -beautifulsoup4==4.12.2 +beautifulsoup4==4.12.3 black==23.3.0 bleach==6.0.0 cached-property==1.5.2 cachetools==5.3.2 cattrs==23.1.2 -certifi==2023.11.17 +certifi==2024.2.2 cffi==1.15.1 cfgv==3.3.1 chardet==5.2.0 @@ -60,7 +60,7 @@ ipykernel==6.16.2 ipympl==0.9.3 ipython==7.34.0 ipython-genutils==0.2.0 -ipywidgets==8.1.1 +ipywidgets==8.1.2 isoduration==20.11.0 isort==5.11.5 jedi==0.18.2 @@ -78,20 +78,20 @@ jupyter-server-fileid==0.9.1 jupyter-server-mathjax==0.2.6 jupyter-server-ydoc==0.8.0 jupyter-ydoc==0.2.5 -jupyterlab==3.6.6 +jupyterlab==3.6.7 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.44.0 jupyterlab-lsp==3.10.2 jupyterlab-myst==1.2.0 jupyterlab-pygments==0.2.2 jupyterlab-server==2.24.0 -jupyterlab-widgets==3.0.9 +jupyterlab-widgets==3.0.10 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 lsprotocol==2023.0.1 markdown-it-py==2.2.0 -markupsafe==2.1.3 +markupsafe==2.1.5 matplotlib==3.5.3 matplotlib-inline==0.1.6 mdit-py-plugins==0.3.5 @@ -109,13 +109,13 @@ nbconvert==7.6.0 nbdime==3.2.1 nbformat==5.8.0 nbmake==1.3.0 -nest-asyncio==1.5.8 +nest-asyncio==1.6.0 nodeenv==1.8.0 notebook==6.5.6 notebook-shim==0.2.3 numpy==1.21.6 packaging==23.2 -pandocfilters==1.5.0 +pandocfilters==1.5.1 parso==0.8.3 particle==0.23.1 pathspec==0.11.2 @@ -128,12 +128,12 @@ pluggy==1.2.0 pre-commit==2.21.0 prometheus-client==0.17.1 prompt-toolkit==3.0.43 -psutil==5.9.7 +psutil==5.9.8 ptyprocess==0.7.0 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydantic==1.10.13 +pydantic==1.10.14 pydata-sphinx-theme==0.13.3 pygments==2.17.2 pyparsing==3.1.1 @@ -150,7 +150,7 @@ python-lsp-jsonrpc==1.0.0 python-lsp-ruff==1.6.0 python-lsp-server==1.7.4 pytoolconfig==1.3.0 -pytz==2023.3.post1 +pytz==2024.1 pyyaml==6.0.1 pyzmq==24.0.1 qrules==0.9.8 @@ -159,7 +159,8 @@ rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.0 rope==1.9.0 -ruff==0.1.13 +ruff==0.1.15 +scipy==1.7.3 send2trash==1.8.2 singledispatchmethod==1.0 ; python_version < "3.8.0" six==1.16.0 @@ -194,7 +195,7 @@ tinycss2==1.2.1 tomli==2.0.1 tornado==6.2 tox==4.8.0 -tqdm==4.66.1 +tqdm==4.66.2 traitlets==5.9.0 typed-ast==1.5.5 typing-extensions==4.7.1 ; python_version < "3.8.0" @@ -207,7 +208,7 @@ webcolors==1.13 webencodings==0.5.1 websocket-client==1.6.1 wheel==0.42.0 -widgetsnbextension==4.0.9 +widgetsnbextension==4.0.10 y-py==0.6.2 ypy-websocket==0.8.4 zipp==3.15.0 diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index 92520a9f4..25d61ddd1 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -15,12 +15,12 @@ async-lru==2.0.4 attrs==23.2.0 babel==2.14.0 backcall==0.2.0 -beautifulsoup4==4.12.2 -black==23.12.1 +beautifulsoup4==4.12.3 +black==24.1.1 bleach==6.1.0 cachetools==5.3.2 cattrs==23.2.3 -certifi==2023.11.17 +certifi==2024.2.2 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 @@ -29,9 +29,9 @@ click==8.1.7 colorama==0.4.6 comm==0.2.1 contourpy==1.1.1 -coverage==7.4.0 +coverage==7.4.1 cycler==0.12.1 -debugpy==1.8.0 +debugpy==1.8.1 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 @@ -42,55 +42,58 @@ execnet==2.0.2 executing==2.0.1 fastjsonschema==2.19.1 filelock==3.13.1 -fonttools==4.47.2 +fonttools==4.48.1 fqdn==1.5.1 gitdb==4.0.11 gitpython==3.1.41 gprof2dot==2022.7.29 graphviz==0.20.1 greenlet==3.0.3 +h11==0.14.0 hepunits==2.3.3 -identify==2.5.33 +httpcore==1.0.2 +httpx==0.26.0 +identify==2.5.34 idna==3.6 imagesize==1.4.1 importlib-metadata==7.0.1 importlib-resources==6.1.1 iniconfig==2.0.0 -ipykernel==6.28.0 +ipykernel==6.29.2 ipympl==0.9.3 ipython==8.12.3 ipython-genutils==0.2.0 -ipywidgets==8.1.1 +ipywidgets==8.1.2 isoduration==20.11.0 isort==5.13.2 jedi==0.19.1 jinja2==3.1.3 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.20.0 +jsonschema==4.21.1 jsonschema-specifications==2023.12.1 jupyter-cache==0.6.1 jupyter-client==8.6.0 jupyter-core==5.7.1 jupyter-events==0.9.0 -jupyter-lsp==2.2.1 -jupyter-server==2.12.4 +jupyter-lsp==2.2.2 +jupyter-server==2.12.5 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.5.1 -jupyterlab==4.0.10 +jupyter-server-terminals==0.5.2 +jupyterlab==4.1.0 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 -jupyterlab-lsp==5.0.1 +jupyterlab-lsp==5.0.3 jupyterlab-myst==2.1.0 jupyterlab-pygments==0.3.0 jupyterlab-server==2.25.2 -jupyterlab-widgets==3.0.9 +jupyterlab-widgets==3.0.10 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 lsprotocol==2023.0.1 markdown-it-py==2.2.0 -markupsafe==2.1.3 +markupsafe==2.1.5 matplotlib==3.7.4 matplotlib-inline==0.1.6 mdit-py-plugins==0.3.5 @@ -103,17 +106,17 @@ mypy-extensions==1.0.0 myst-nb==0.17.2 myst-parser==0.18.1 nbclient==0.6.8 -nbconvert==7.14.1 +nbconvert==7.16.0 nbdime==4.0.1 nbformat==5.9.2 -nbmake==1.4.6 -nest-asyncio==1.5.8 +nbmake==1.5.0 +nest-asyncio==1.6.0 nodeenv==1.8.0 notebook-shim==0.2.3 numpy==1.24.4 -overrides==7.4.0 +overrides==7.7.0 packaging==23.2 -pandocfilters==1.5.0 +pandocfilters==1.5.1 parso==0.8.3 particle==0.23.1 pathspec==0.12.1 @@ -121,12 +124,12 @@ pexpect==4.9.0 pickleshare==0.7.5 pillow==10.2.0 pkgutil-resolve-name==1.3.10 -platformdirs==4.1.0 -pluggy==1.3.0 +platformdirs==4.2.0 +pluggy==1.4.0 pre-commit==3.5.0 prometheus-client==0.19.0 prompt-toolkit==3.0.43 -psutil==5.9.7 +psutil==5.9.8 ptyprocess==0.7.0 pure-eval==0.2.2 pybtex==0.24.0 @@ -136,7 +139,7 @@ pydata-sphinx-theme==0.14.4 pygments==2.17.2 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.4 +pytest==8.0.0 pytest-cov==4.1.0 pytest-profiling==1.7.0 pytest-xdist==3.5.0 @@ -144,21 +147,22 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.0.2 -python-lsp-server==1.9.0 +python-lsp-ruff==2.1.0 +python-lsp-server==1.10.0 pytoolconfig==1.3.1 -pytz==2023.3.post1 +pytz==2024.1 pyyaml==6.0.1 pyzmq==25.1.2 qrules==0.9.8 -referencing==0.32.1 +referencing==0.33.0 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.0 -rope==1.11.0 -rpds-py==0.16.2 -ruff==0.1.13 +rope==1.12.0 +rpds-py==0.17.1 +ruff==0.2.1 +scipy==1.10.1 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 @@ -175,7 +179,7 @@ sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-hep-pdgref==0.2.0 sphinx-pybtex-etal-style==0.0.2 -sphinx-thebe==0.3.0 +sphinx-thebe==0.3.1 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.4 sphinxcontrib-bibtex==2.6.2 @@ -184,7 +188,7 @@ sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 -sqlalchemy==2.0.25 +sqlalchemy==2.0.26 stack-data==0.6.3 sympy==1.12 tabulate==0.9.0 @@ -192,21 +196,21 @@ terminado==0.18.0 tinycss2==1.2.1 tomli==2.0.1 tornado==6.4 -tox==4.12.0 -tqdm==4.66.1 +tox==4.12.1 +tqdm==4.66.2 traitlets==5.14.1 types-python-dateutil==2.8.19.20240106 typing-extensions==4.9.0 ujson==5.9.0 uri-template==1.3.0 -urllib3==2.1.0 +urllib3==2.2.0 virtualenv==20.25.0 wcwidth==0.2.13 webcolors==1.13 webencodings==0.5.1 websocket-client==1.7.0 wheel==0.42.0 -widgetsnbextension==4.0.9 +widgetsnbextension==4.0.10 zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index a1109267a..d56ad3f2c 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -14,12 +14,12 @@ asttokens==2.4.1 async-lru==2.0.4 attrs==23.2.0 babel==2.14.0 -beautifulsoup4==4.12.2 -black==23.12.1 +beautifulsoup4==4.12.3 +black==24.1.1 bleach==6.1.0 cachetools==5.3.2 cattrs==23.2.3 -certifi==2023.11.17 +certifi==2024.2.2 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 @@ -28,9 +28,9 @@ click==8.1.7 colorama==0.4.6 comm==0.2.1 contourpy==1.2.0 -coverage==7.4.0 +coverage==7.4.1 cycler==0.12.1 -debugpy==1.8.0 +debugpy==1.8.1 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 @@ -41,55 +41,58 @@ execnet==2.0.2 executing==2.0.1 fastjsonschema==2.19.1 filelock==3.13.1 -fonttools==4.47.2 +fonttools==4.48.1 fqdn==1.5.1 gitdb==4.0.11 gitpython==3.1.41 gprof2dot==2022.7.29 graphviz==0.20.1 greenlet==3.0.3 +h11==0.14.0 hepunits==2.3.3 -identify==2.5.33 +httpcore==1.0.2 +httpx==0.26.0 +identify==2.5.34 idna==3.6 imagesize==1.4.1 importlib-metadata==7.0.1 importlib-resources==6.1.1 iniconfig==2.0.0 -ipykernel==6.28.0 +ipykernel==6.29.2 ipympl==0.9.3 ipython==8.18.1 ipython-genutils==0.2.0 -ipywidgets==8.1.1 +ipywidgets==8.1.2 isoduration==20.11.0 isort==5.13.2 jedi==0.19.1 jinja2==3.1.3 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.20.0 +jsonschema==4.21.1 jsonschema-specifications==2023.12.1 jupyter-cache==1.0.0 jupyter-client==8.6.0 jupyter-core==5.7.1 jupyter-events==0.9.0 -jupyter-lsp==2.2.1 -jupyter-server==2.12.4 +jupyter-lsp==2.2.2 +jupyter-server==2.12.5 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.5.1 -jupyterlab==4.0.10 +jupyter-server-terminals==0.5.2 +jupyterlab==4.1.0 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 -jupyterlab-lsp==5.0.1 +jupyterlab-lsp==5.0.3 jupyterlab-myst==2.1.0 jupyterlab-pygments==0.3.0 jupyterlab-server==2.25.2 -jupyterlab-widgets==3.0.9 +jupyterlab-widgets==3.0.10 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 lsprotocol==2023.0.1 markdown-it-py==3.0.0 -markupsafe==2.1.3 +markupsafe==2.1.5 matplotlib==3.8.2 matplotlib-inline==0.1.6 mdit-py-plugins==0.4.0 @@ -102,38 +105,38 @@ mypy-extensions==1.0.0 myst-nb==1.0.0 myst-parser==2.0.0 nbclient==0.6.8 -nbconvert==7.14.1 +nbconvert==7.16.0 nbdime==4.0.1 nbformat==5.9.2 -nbmake==1.4.6 -nest-asyncio==1.5.8 +nbmake==1.5.0 +nest-asyncio==1.6.0 nodeenv==1.8.0 notebook-shim==0.2.3 -numpy==1.26.3 -overrides==7.4.0 +numpy==1.26.4 +overrides==7.7.0 packaging==23.2 -pandocfilters==1.5.0 +pandocfilters==1.5.1 parso==0.8.3 particle==0.23.1 pathspec==0.12.1 pexpect==4.9.0 pillow==10.2.0 -platformdirs==4.1.0 -pluggy==1.3.0 -pre-commit==3.6.0 +platformdirs==4.2.0 +pluggy==1.4.0 +pre-commit==3.6.1 prometheus-client==0.19.0 prompt-toolkit==3.0.43 -psutil==5.9.7 +psutil==5.9.8 ptyprocess==0.7.0 pure-eval==0.2.2 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydata-sphinx-theme==0.15.1 +pydata-sphinx-theme==0.15.2 pygments==2.17.2 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.4 +pytest==8.0.0 pytest-cov==4.1.0 pytest-profiling==1.7.0 pytest-xdist==3.5.0 @@ -141,20 +144,21 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.0.2 -python-lsp-server==1.9.0 +python-lsp-ruff==2.1.0 +python-lsp-server==1.10.0 pytoolconfig==1.3.1 pyyaml==6.0.1 pyzmq==25.1.2 qrules==0.9.8 -referencing==0.32.1 +referencing==0.33.0 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.0 -rope==1.11.0 -rpds-py==0.16.2 -ruff==0.1.13 +rope==1.12.0 +rpds-py==0.17.1 +ruff==0.2.1 +scipy==1.12.0 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 @@ -163,7 +167,7 @@ snowballstemmer==2.2.0 soupsieve==2.5 sphinx==7.2.6 sphinx-api-relink==0.0.8 -sphinx-autobuild==2021.3.14 +sphinx-autobuild==2024.2.4 sphinx-book-theme==1.1.0 sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 @@ -171,16 +175,16 @@ sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-hep-pdgref==0.2.0 sphinx-pybtex-etal-style==0.0.2 -sphinx-thebe==0.3.0 +sphinx-thebe==0.3.1 sphinx-togglebutton==0.3.2 -sphinxcontrib-applehelp==1.0.7 +sphinxcontrib-applehelp==1.0.8 sphinxcontrib-bibtex==2.6.2 -sphinxcontrib-devhelp==1.0.5 -sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-devhelp==1.0.6 +sphinxcontrib-htmlhelp==2.0.5 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.6 -sphinxcontrib-serializinghtml==1.1.9 -sqlalchemy==2.0.25 +sphinxcontrib-qthelp==1.0.7 +sphinxcontrib-serializinghtml==1.1.10 +sqlalchemy==2.0.26 stack-data==0.6.3 sympy==1.12 tabulate==0.9.0 @@ -188,21 +192,21 @@ terminado==0.18.0 tinycss2==1.2.1 tomli==2.0.1 tornado==6.4 -tox==4.12.0 -tqdm==4.66.1 +tox==4.12.1 +tqdm==4.66.2 traitlets==5.14.1 types-python-dateutil==2.8.19.20240106 typing-extensions==4.9.0 ujson==5.9.0 uri-template==1.3.0 -urllib3==2.1.0 +urllib3==2.2.0 virtualenv==20.25.0 wcwidth==0.2.13 webcolors==1.13 webencodings==0.5.1 websocket-client==1.7.0 wheel==0.42.0 -widgetsnbextension==4.0.9 +widgetsnbextension==4.0.10 zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index a1322e2d6..000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,10 +0,0 @@ -version: 2 -updates: - - package-ecosystem: github-actions - directory: "/" - assignees: - - redeboer - labels: - - 🖱️ DX - schedule: - interval: monthly diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 109d8fcfe..fa87610fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,8 @@ name: CI concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: |- + ${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }} env: PYTHONHASHSEED: "0" diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index d64f197bf..52340935a 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -11,6 +11,6 @@ jobs: update_release_draft: runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/requirements.yml b/.github/workflows/requirements.yml index 32b95f19e..6716e9746 100644 --- a/.github/workflows/requirements.yml +++ b/.github/workflows/requirements.yml @@ -2,7 +2,8 @@ name: Requirements concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: |- + ${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }} on: pull_request: diff --git a/.gitpod.yml b/.gitpod.yml index 7051da221..6c8643b4b 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -31,9 +31,8 @@ vscode: - ms-vsliveshare.vsliveshare - redhat.vscode-yaml - ryanluker.vscode-coverage-gutters - - Soulcode.vscode-unwanted-extensions + - soulcode.vscode-unwanted-extensions - stkb.rewrap - streetsidesoftware.code-spell-checker - tamasfe.even-better-toml - - tyriar.sort-lines - yzhang.markdown-all-in-one diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 360fd8964..b500bf7f7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,8 +14,33 @@ repos: - id: check-hooks-apply - id: check-useless-excludes + - repo: https://github.com/kynan/nbstripout + rev: 0.7.1 + hooks: + - id: nbstripout + args: + - --extra-keys + - | + cell.attachments + cell.metadata.code_folding + cell.metadata.id + cell.metadata.pycharm + cell.metadata.user_expressions + metadata.celltoolbar + metadata.colab.name + metadata.colab.provenance + metadata.interpreter + metadata.notify_time + metadata.toc + metadata.toc-autonumbering + metadata.toc-showcode + metadata.toc-showmarkdowntxt + metadata.toc-showtags + metadata.varInspector + metadata.vscode + - repo: https://github.com/ComPWA/policy - rev: 0.2.0 + rev: 0.2.4 hooks: - id: check-dev-files args: @@ -58,7 +83,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black - id: black-jupyter @@ -70,8 +95,25 @@ repos: hooks: - id: blacken-docs + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v4.0.0-alpha.8 + hooks: + - id: prettier + + - repo: https://github.com/ComPWA/mirrors-taplo + rev: v0.8.1 + hooks: + - id: taplo + + - repo: https://github.com/pappasam/toml-sort + rev: v0.23.1 + hooks: + - id: toml-sort + args: + - --in-place + - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.27.3 + rev: 0.28.0 hooks: - id: check-jsonschema name: Check CITATION.cff @@ -109,56 +151,14 @@ repos: types: - python - - repo: https://github.com/kynan/nbstripout - rev: 0.6.1 - hooks: - - id: nbstripout - args: - - --extra-keys - - | - cell.attachments - cell.metadata.code_folding - cell.metadata.id - cell.metadata.pycharm - cell.metadata.user_expressions - metadata.celltoolbar - metadata.colab.name - metadata.colab.provenance - metadata.interpreter - metadata.notify_time - metadata.toc - metadata.toc-autonumbering - metadata.toc-showcode - metadata.toc-showmarkdowntxt - metadata.toc-showtags - metadata.varInspector - metadata.vscode - - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v4.0.0-alpha.8 - hooks: - - id: prettier - - repo: https://github.com/ComPWA/mirrors-pyright - rev: v1.1.345 + rev: v1.1.350 hooks: - id: pyright - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.13 + rev: v0.2.1 hooks: - id: ruff args: [--fix] types_or: [python, pyi, jupyter] - - - repo: https://github.com/ComPWA/mirrors-taplo - rev: v0.8.1 - hooks: - - id: taplo - - - repo: https://github.com/pappasam/toml-sort - rev: v0.23.1 - hooks: - - id: toml-sort - args: - - --in-place diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 384928bda..0c759a376 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -17,11 +17,10 @@ "ms-vsliveshare.vsliveshare", "redhat.vscode-yaml", "ryanluker.vscode-coverage-gutters", - "Soulcode.vscode-unwanted-extensions", + "soulcode.vscode-unwanted-extensions", "stkb.rewrap", "streetsidesoftware.code-spell-checker", "tamasfe.even-better-toml", - "tyriar.sort-lines", "yzhang.markdown-all-in-one" ], "unwantedRecommendations": [ @@ -31,6 +30,7 @@ "ms-python.flake8", "ms-python.isort", "ms-python.pylint", - "travisillig.vscode-json-stable-stringify" + "travisillig.vscode-json-stable-stringify", + "tyriar.sort-lines" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index e74f30354..5944d6706 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -42,6 +42,7 @@ "git.rebaseWhenSync": true, "github-actions.workflows.pinned.refresh.enabled": true, "github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"], + "gitlens.telemetry.enabled": false, "json.schemas": [ { "fileMatch": [".zenodo.json"], @@ -59,14 +60,16 @@ "python.testing.pytestArgs": ["--color=no", "--no-cov"], "python.testing.pytestEnabled": true, "python.testing.unittestEnabled": false, + "redhat.telemetry.enabled": false, "rewrap.wrappingColumn": 88, "ruff.enable": true, "ruff.organizeImports": true, "search.exclude": { - "typings/**": true, "**/tests/**/__init__.py": true, - ".constraints/*.txt": true + ".constraints/*.txt": true, + "typings/**": true }, + "telemetry.telemetryLevel": "off", "yaml.schemas": { "https://citation-file-format.github.io/1.2.0/schema.json": "CITATION.cff", "https://json.schemastore.org/github-workflow.json": "./.github/workflows/requirements.yml", diff --git a/docs/conf.py b/docs/conf.py index cfce053d9..39576d6a6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,7 +13,7 @@ ) sys.path.insert(0, os.path.abspath(".")) -from _extend_docstrings import extend_docstrings +from _extend_docstrings import extend_docstrings # noqa: PLC2701 extend_docstrings() set_intersphinx_version_remapping({ diff --git a/docs/usage/amplitude.ipynb b/docs/usage/amplitude.ipynb index a14a312ad..de196185c 100644 --- a/docs/usage/amplitude.ipynb +++ b/docs/usage/amplitude.ipynb @@ -77,6 +77,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "import sympy as sp\n", "from IPython.display import Math\n", "\n", diff --git a/docs/usage/dynamics.ipynb b/docs/usage/dynamics.ipynb index 806efacb8..3c2de1aa6 100644 --- a/docs/usage/dynamics.ipynb +++ b/docs/usage/dynamics.ipynb @@ -114,6 +114,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "import logging\n", "import warnings\n", "\n", diff --git a/docs/usage/dynamics/analytic-continuation.ipynb b/docs/usage/dynamics/analytic-continuation.ipynb index 97bd7302f..7151ad7dd 100644 --- a/docs/usage/dynamics/analytic-continuation.ipynb +++ b/docs/usage/dynamics/analytic-continuation.ipynb @@ -109,6 +109,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "import warnings\n", "\n", "import sympy as sp\n", diff --git a/docs/usage/dynamics/custom.ipynb b/docs/usage/dynamics/custom.ipynb index 0d44c6cfe..22694e50f 100644 --- a/docs/usage/dynamics/custom.ipynb +++ b/docs/usage/dynamics/custom.ipynb @@ -77,6 +77,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "from __future__ import annotations\n", "\n", "import graphviz\n", diff --git a/docs/usage/dynamics/k-matrix.ipynb b/docs/usage/dynamics/k-matrix.ipynb index d41353307..3f36e155e 100644 --- a/docs/usage/dynamics/k-matrix.ipynb +++ b/docs/usage/dynamics/k-matrix.ipynb @@ -679,7 +679,7 @@ " lambda s: re.match(r\"^\\\\?gamma\", s.name),\n", " expression.free_symbols,\n", " )\n", - " return expression.xreplace({gamma: 1 for gamma in residue_constants})\n", + " return expression.xreplace(dict.fromkeys(residue_constants, 1))\n", "\n", "\n", "display(\n", diff --git a/docs/usage/interactive.ipynb b/docs/usage/interactive.ipynb index 4ecefc178..1d68fb586 100644 --- a/docs/usage/interactive.ipynb +++ b/docs/usage/interactive.ipynb @@ -480,6 +480,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "import matplotlib.pyplot as plt\n", "import mpl_interactions.ipyplot as iplt\n", "\n", @@ -501,7 +502,7 @@ " plot_domain,\n", " intensity,\n", " **sliders,\n", - " slider_formats={slider: \"{:.3f}\" for slider in arg_names},\n", + " slider_formats=dict.fromkeys(arg_names, \"{:.3f}\"),\n", " ylim=\"auto\",\n", " ax=ax_intensity,\n", ")\n", diff --git a/docs/usage/symplot.ipynb b/docs/usage/symplot.ipynb index 71a8c5ad2..f259b0b21 100644 --- a/docs/usage/symplot.ipynb +++ b/docs/usage/symplot.ipynb @@ -189,6 +189,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "import matplotlib.pyplot as plt\n", "import mpl_interactions.ipyplot as iplt\n", "import numpy as np\n", @@ -197,7 +198,7 @@ "fig, ax = plt.subplots(figsize=(7, 4))\n", "controls = iplt.plot(\n", " plot_domain,\n", - " lambda x, **kwargs: np_expression(x, **kwargs),\n", + " np_expression,\n", " **sliders,\n", " ylim=\"auto\",\n", ")\n", diff --git a/docs/usage/sympy.ipynb b/docs/usage/sympy.ipynb index 902676bdf..3526e4b97 100644 --- a/docs/usage/sympy.ipynb +++ b/docs/usage/sympy.ipynb @@ -408,6 +408,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "import matplotlib.pyplot as plt\n", "\n", "x_area = np.linspace(a_val, b_val, num=100)\n", diff --git a/pyproject.toml b/pyproject.toml index 0a346585f..22030e503 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -218,14 +218,21 @@ exclude = [ "**/_build", "**/typings", ] +reportArgumentType = false +reportAssignmentType = false +reportAttributeAccessIssue = false +reportCallIssue = false reportGeneralTypeIssues = false reportIncompatibleMethodOverride = false +reportInconsistentOverload = false reportMissingParameterType = false reportMissingTypeArgument = false reportMissingTypeStubs = false +reportOperatorIssue = false reportOverlappingOverload = false reportPrivateImportUsage = false reportPrivateUsage = false +reportReturnType = false reportUnboundVariable = false reportUnknownArgumentType = false reportUnknownMemberType = false @@ -279,6 +286,15 @@ testpaths = [ [tool.ruff] extend-exclude = ["typings"] extend-include = ["*.ipynb"] +preview = true +show-fixes = true +src = [ + "src", + "tests", +] +target-version = "py37" + +[tool.ruff.lint] extend-select = [ "A", "B", @@ -323,26 +339,22 @@ ignore = [ "D416", "E501", "PLR0913", + "PLW1514", "PLW2901", "SIM108", ] -show-fixes = true -src = [ - "src", - "tests", -] -target-version = "py37" task-tags = ["cspell"] -[tool.ruff.isort] -known-third-party = ["sympy"] - [tool.ruff.lint.flake8-bugbear] extend-immutable-calls = [ "ampform.sympy._decorator.argument", ] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.isort] +known-third-party = ["sympy"] +split-on-trailing-comma = false + +[tool.ruff.lint.per-file-ignores] "**/docs/usage/sympy.ipynb" = ["E731"] "*.ipynb" = [ "B018", @@ -354,12 +366,14 @@ extend-immutable-calls = [ "F404", "N806", "N816", + "PLC2401", "PLR09", "PLR2004", "PLW0602", "PLW0603", "S101", "S301", + "S403", "T20", "TCH00", ] @@ -370,8 +384,13 @@ extend-immutable-calls = [ "N806", "S101", "S113", + "S403", "T201", ] +"docs/_extend_docstrings.py" = [ + "PLC0415", + "PLC2701", +] "docs/conf.py" = [ "A001", "D100", @@ -382,15 +401,23 @@ extend-immutable-calls = [ "D", "INP001", "PGH001", + "PLC2701", "PLR0913", + "PLR0914", + "PLR0917", "PLR2004", + "PLR6301", "S101", "T20", ] -[tool.ruff.pydocstyle] +[tool.ruff.lint.pydocstyle] convention = "google" +[tool.ruff.lint.pylint] +allow-dunder-method-names = ["_latex_repr_", "_repr_pretty_"] +max-positional-args = 7 + [tool.tomlsort] all = false ignore_case = true diff --git a/src/ampform/__init__.py b/src/ampform/__init__.py index 5bef1d502..030e25d0b 100644 --- a/src/ampform/__init__.py +++ b/src/ampform/__init__.py @@ -25,7 +25,7 @@ def get_builder(reaction: ReactionInfo) -> HelicityAmplitudeBuilder: raise ValueError(msg) if formalism == "helicity": amplitude_builder = HelicityAmplitudeBuilder(reaction) - elif formalism in ["canonical-helicity", "canonical"]: + elif formalism in {"canonical-helicity", "canonical"}: amplitude_builder = CanonicalAmplitudeBuilder(reaction) else: msg = f'No amplitude generator for formalism type "{formalism}"' diff --git a/src/ampform/dynamics/__init__.py b/src/ampform/dynamics/__init__.py index 3238da74a..05c68878d 100644 --- a/src/ampform/dynamics/__init__.py +++ b/src/ampform/dynamics/__init__.py @@ -193,7 +193,7 @@ def relativistic_breit_wigner(s, mass0, gamma0) -> sp.Expr: return gamma0 * mass0 / (mass0**2 - s - gamma0 * mass0 * sp.I) -def relativistic_breit_wigner_with_ff( +def relativistic_breit_wigner_with_ff( # noqa: PLR0917 s, mass0, gamma0, diff --git a/src/ampform/dynamics/kmatrix.py b/src/ampform/dynamics/kmatrix.py index ecacb0a2e..defa8071a 100644 --- a/src/ampform/dynamics/kmatrix.py +++ b/src/ampform/dynamics/kmatrix.py @@ -103,7 +103,7 @@ def formulate( # type: ignore[override] # noqa: D417 }) @staticmethod - def parametrization( + def parametrization( # noqa: PLR0917 i, j, s, @@ -176,7 +176,7 @@ def formulate( }) @staticmethod - def parametrization( + def parametrization( # noqa: PLR0917 i, j, s, @@ -252,7 +252,7 @@ def formulate( }) @staticmethod - def parametrization( + def parametrization( # noqa: PLR0917 i, s, pole_position: sp.IndexedBase, @@ -366,7 +366,7 @@ def formulate( # type: ignore[override] # noqa: D417 ) @staticmethod - def parametrization( + def parametrization( # noqa: PLR0917 i, s, pole_position: sp.IndexedBase, diff --git a/src/ampform/helicity/__init__.py b/src/ampform/helicity/__init__.py index b298c7594..bb63d1c4c 100644 --- a/src/ampform/helicity/__init__.py +++ b/src/ampform/helicity/__init__.py @@ -85,7 +85,7 @@ def _order_component_mapping( - mapping: Mapping[str, sp.Expr] + mapping: Mapping[str, sp.Expr], ) -> OrderedDict[str, sp.Expr]: return collections.OrderedDict( [(key, mapping[key]) for key in sorted(mapping, key=natural_sorting)] @@ -93,7 +93,7 @@ def _order_component_mapping( def _order_symbol_mapping( - mapping: Mapping[sp.Symbol, sp.Expr] + mapping: Mapping[sp.Symbol, sp.Expr], ) -> OrderedDict[sp.Symbol, sp.Expr]: return collections.OrderedDict([ (symbol, mapping[symbol]) @@ -102,7 +102,7 @@ def _order_symbol_mapping( def _order_amplitudes( - mapping: Mapping[sp.Indexed, sp.Expr] + mapping: Mapping[sp.Indexed, sp.Expr], ) -> OrderedDict[sp.Indexed, sp.Expr]: return collections.OrderedDict([ (key, mapping[key]) @@ -320,7 +320,7 @@ def __setitem__(self, key: sp.Basic | int | str, value: ParameterValue) -> None: self.__parameters[par] = value @singledispatchmethod - def _get_parameter(self, key: sp.Basic | int | str) -> sp.Basic: + def _get_parameter(self, key: sp.Basic | int | str) -> sp.Basic: # noqa: PLR6301 msg = f"Cannot find parameter for key type {type(key).__name__}" raise KeyError(msg) # no TypeError because of sympy.core.expr.Expr.xreplace @@ -397,7 +397,9 @@ def __init__(self, transitions: ReactionInfo | Iterable[StateTransition]) -> Non self.__choices[decay] = create_non_dynamic @singledispatchmethod - def assign(self, selection, builder: ResonanceDynamicsBuilder) -> None: + def assign( # noqa: PLR6301 + self, selection, builder: ResonanceDynamicsBuilder + ) -> None: """Assign a `.ResonanceDynamicsBuilder` to a selection of nodes. Currently, the following types of selections are implements: @@ -904,7 +906,7 @@ def formulate_clebsch_gordan_coefficients( = C^{1,(-1-0)}_{2,0,1,(-1-0)} C^{1,(-1-0)}_{1,-1,0,0} = C^{1,-1}_{2,0,1,-1} C^{1,-1}_{1,-1,0,0} """ - from sympy.physics.quantum.cg import CG + from sympy.physics.quantum.cg import CG # noqa: PLC0415 decay = TwoBodyDecay.from_transition(transition, node_id) @@ -983,7 +985,7 @@ def formulate_wigner_d(transition: StateTransition, node_id: int) -> sp.Expr: >>> formulate_wigner_d(transition, node_id=0) WignerD(1, 1, -1, -phi_0, theta_0, 0) """ - from sympy.physics.quantum.spin import Rotation as Wigner + from sympy.physics.quantum.spin import Rotation as Wigner # noqa: PLC0415 decay = TwoBodyDecay.from_transition(transition, node_id) _, phi, theta = _generate_kinematic_variables(transition, node_id) @@ -1206,7 +1208,7 @@ def formulate_helicity_rotation( >>> formulate_helicity_rotation(1/2, -1/2, i, a, b, c) PoolSum(WignerD(1/2, -1/2, i, a, b, c), (i, (-1/2, 1/2))) """ - from sympy.physics.quantum.spin import Rotation as Wigner + from sympy.physics.quantum.spin import Rotation as Wigner # noqa: PLC0415 helicities = map(sp.Rational, _create_spin_range(spin_magnitude, no_zero_spin)) return PoolSum( diff --git a/src/ampform/helicity/naming.py b/src/ampform/helicity/naming.py index 325a51146..cce42229e 100644 --- a/src/ampform/helicity/naming.py +++ b/src/ampform/helicity/naming.py @@ -164,7 +164,7 @@ def __generate_amplitude_coefficient_couple( return (par_name_suffix, pp_par_name_suffix, priority_name_suffix) - def generate_amplitude_name( + def generate_amplitude_name( # noqa: PLR6301 self, transition: StateTransition, node_id: int | None = None, diff --git a/src/ampform/kinematics/lorentz.py b/src/ampform/kinematics/lorentz.py index 2ac8eb127..20f7f0b61 100644 --- a/src/ampform/kinematics/lorentz.py +++ b/src/ampform/kinematics/lorentz.py @@ -191,7 +191,7 @@ class MinkowskiMetric(NumPyPrintable): momentum: sp.Basic _latex_repr_ = R"\boldsymbol{\eta}" - def as_explicit(self) -> sp.MutableDenseMatrix: + def as_explicit(self) -> sp.MutableDenseMatrix: # noqa: PLR6301 return sp.Matrix([ [1, 0, 0, 0], [0, -1, 0, 0], diff --git a/src/ampform/sympy/__init__.py b/src/ampform/sympy/__init__.py index c0f6895b1..c99ddc6f8 100644 --- a/src/ampform/sympy/__init__.py +++ b/src/ampform/sympy/__init__.py @@ -17,7 +17,7 @@ import itertools import logging import os -import pickle +import pickle # noqa: S403 import re import sys import warnings @@ -29,7 +29,7 @@ import sympy as sp from sympy.printing.conventions import split_super_sub from sympy.printing.precedence import PRECEDENCE -from sympy.printing.pycode import _unpack_integral_limits +from sympy.printing.pycode import _unpack_integral_limits # noqa: PLC2701 from ._decorator import ( ExprClass, # noqa: F401 # pyright: ignore[reportUnusedImport] @@ -398,7 +398,7 @@ def _numpycode(self, printer, *args): def _warn_if_scipy_not_installed() -> None: try: - import scipy # noqa: F401 # pyright: ignore[reportUnusedImport, reportMissingImports] + import scipy # noqa: F401, PLC0415 # pyright: ignore[reportUnusedImport, reportMissingImports] except ImportError: warnings.warn( "Scipy is not installed. Install with 'pip install scipy' or with 'pip" diff --git a/src/ampform/sympy/_array_expressions.py b/src/ampform/sympy/_array_expressions.py index 2d9428938..fbab1270e 100644 --- a/src/ampform/sympy/_array_expressions.py +++ b/src/ampform/sympy/_array_expressions.py @@ -14,7 +14,7 @@ import sympy as sp from sympy.codegen.ast import none -from sympy.core.sympify import _sympify +from sympy.core.sympify import _sympify # noqa: PLC2701 from sympy.functions.elementary.integers import floor from sympy.printing.conventions import split_super_sub from sympy.printing.latex import LatexPrinter @@ -23,7 +23,7 @@ from sympy.printing.str import StrPrinter from sympy.tensor.array.expressions.array_expressions import ( ArraySymbol, - _ArrayExpr, + _ArrayExpr, # noqa: PLC2701 get_shape, ) diff --git a/src/ampform/sympy/_decorator.py b/src/ampform/sympy/_decorator.py index 89ab23d29..3618185d4 100644 --- a/src/ampform/sympy/_decorator.py +++ b/src/ampform/sympy/_decorator.py @@ -16,7 +16,7 @@ from typing import TYPE_CHECKING, Any, Callable, Hashable, Iterable, TypeVar, overload import sympy as sp -from sympy.core.basic import _aresame +from sympy.core.basic import _aresame # noqa: PLC2701 from sympy.utilities.exceptions import SymPyDeprecationWarning if sys.version_info < (3, 8): diff --git a/tests/dynamics/test_deprecated.py b/tests/dynamics/test_deprecated.py index d0123b999..93dc5a2ac 100644 --- a/tests/dynamics/test_deprecated.py +++ b/tests/dynamics/test_deprecated.py @@ -1,4 +1,4 @@ -import pickle +import pickle # noqa: S403 import sympy as sp diff --git a/tests/dynamics/test_kmatrix.py b/tests/dynamics/test_kmatrix.py index 899bf2ea4..0d1f1ddf2 100644 --- a/tests/dynamics/test_kmatrix.py +++ b/tests/dynamics/test_kmatrix.py @@ -44,7 +44,7 @@ def test_interference_single_channel(self): def _remove_residue_constants(expression: sp.Expr) -> sp.Expr: free_symbols: set[sp.Symbol] = expression.free_symbols # type: ignore[assignment] residue_constants = filter(lambda s: s.name.startswith(R"\gamma_"), free_symbols) - return expression.xreplace({gamma: 1 for gamma in residue_constants}) + return expression.xreplace(dict.fromkeys(residue_constants, 1)) def _rename_widths(expression: sp.Expr) -> sp.Expr: diff --git a/tests/kinematics/conftest.py b/tests/kinematics/conftest.py index 385c10807..0db56a3eb 100644 --- a/tests/kinematics/conftest.py +++ b/tests/kinematics/conftest.py @@ -13,7 +13,7 @@ @pytest.fixture(scope="session") def topology_and_momentum_symbols( - data_sample: dict[int, np.ndarray] + data_sample: dict[int, np.ndarray], ) -> tuple[Topology, FourMomenta]: n = len(data_sample) assert n == 4 diff --git a/tests/kinematics/test_angles.py b/tests/kinematics/test_angles.py index 46470a679..125c1358c 100644 --- a/tests/kinematics/test_angles.py +++ b/tests/kinematics/test_angles.py @@ -27,7 +27,7 @@ @pytest.fixture(scope="session") def helicity_angles( - topology_and_momentum_symbols: tuple[Topology, FourMomenta] + topology_and_momentum_symbols: tuple[Topology, FourMomenta], ) -> dict[sp.Symbol, sp.Expr]: topology, momentum_symbols = topology_and_momentum_symbols return compute_helicity_angles(momentum_symbols, topology) diff --git a/tests/kinematics/test_lorentz.py b/tests/kinematics/test_lorentz.py index 55048c120..19a6d4403 100644 --- a/tests/kinematics/test_lorentz.py +++ b/tests/kinematics/test_lorentz.py @@ -368,7 +368,7 @@ def test_numpycode(self, array_type, shape): def test_compute_invariant_masses_names( - topology_and_momentum_symbols: tuple[Topology, FourMomenta] + topology_and_momentum_symbols: tuple[Topology, FourMomenta], ): topology, momentum_symbols = topology_and_momentum_symbols invariant_masses = compute_invariant_masses(momentum_symbols, topology) diff --git a/tests/symplot/test_symplot.py b/tests/symplot/test_symplot.py index 3d4cf0dee..530328345 100644 --- a/tests/symplot/test_symplot.py +++ b/tests/symplot/test_symplot.py @@ -77,7 +77,7 @@ def test_len(self, slider_kwargs: SliderKwargs) -> None: def test_repr( self, repr_function: Callable[[Any], str], slider_kwargs: SliderKwargs ) -> None: - from_repr: SliderKwargs = eval(repr_function(slider_kwargs)) # noqa: S307 + from_repr: SliderKwargs = eval(repr_function(slider_kwargs)) assert set(from_repr) == set(slider_kwargs) for slider_name in slider_kwargs: slider = slider_kwargs[slider_name] diff --git a/tests/sympy/test_caching.py b/tests/sympy/test_caching.py index 9cd648c05..292996bfd 100644 --- a/tests/sympy/test_caching.py +++ b/tests/sympy/test_caching.py @@ -73,7 +73,7 @@ def test_get_readable_hash(assumptions, expected_hashes, caplog: LogCaptureFixtu assert h == expected_hash else: pytest.skip(f"PYTHONHASHSEED has been set, but is {python_hash_seed}, not 0") - assert caplog.text == "" + assert not caplog.text def test_get_readable_hash_energy_dependent_width():