diff --git a/.constraints/py3.10.txt b/.constraints/py3.10.txt index 3acdb108..a6e7e599 100644 --- a/.constraints/py3.10.txt +++ b/.constraints/py3.10.txt @@ -4,18 +4,21 @@ # # pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.10.txt --strip-extras setup.py # +aiofiles==22.1.0 +aiosqlite==0.18.0 alabaster==0.7.13 anyio==3.6.2 aquirdturtle-collapsible-headings==3.1.0 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 -astroid==2.13.3 +arrow==1.2.3 +astroid==2.14.1 asttokens==2.2.1 attrs==22.2.0 babel==2.11.0 backcall==0.2.0 -beautifulsoup4==4.11.1 -black==22.12.0 +beautifulsoup4==4.11.2 +black==23.1.0 bleach==6.0.0 cachetools==5.3.0 certifi==2022.12.7 @@ -38,39 +41,46 @@ execnet==1.9.0 executing==1.2.0 fastjsonschema==2.16.2 filelock==3.9.0 -flake8==6.0.0 -flake8-blind-except==0.2.1 -flake8-bugbear==23.1.20 -flake8-builtins==2.1.0 -flake8-comprehensions==3.10.1 -flake8-future-import==0.4.7 +flake8==6.0.0 ; python_version >= "3.8.0" +flake8-blind-except==0.2.1 ; python_version >= "3.8.0" +flake8-bugbear==23.1.20 ; python_version >= "3.8.0" +flake8-builtins==2.1.0 ; python_version >= "3.8.0" +flake8-comprehensions==3.10.1 ; python_version >= "3.8.0" +flake8-future-import==0.4.7 ; python_version >= "3.8.0" flake8-plugin-utils==1.3.2 -flake8-pytest-style==1.6.0 -flake8-rst-docstrings==0.3.0 +flake8-pytest-style==1.6.0 ; python_version >= "3.8.0" +flake8-rst-docstrings==0.3.0 ; python_version >= "3.8.0" flake8-type-ignore==0.1.0.post2 ; python_version >= "3.8.0" -flake8-use-fstring==1.4 +flake8-use-fstring==1.4 ; python_version >= "3.8.0" +fqdn==1.5.1 gprof2dot==2022.7.29 graphviz==0.20.1 greenlet==2.0.2 hepunits==2.3.1 -identify==2.5.15 +identify==2.5.17 idna==3.4 imagesize==1.4.1 importlib-metadata==6.0.0 iniconfig==2.0.0 -ipykernel==6.20.2 +ipykernel==6.21.1 ipython==8.9.0 ipython-genutils==0.2.0 +isoduration==20.11.0 isort==5.12.0 jedi==0.18.2 jinja2==3.1.2 json5==0.9.11 +jsonpointer==2.3 jsonschema==4.17.3 jupyter-cache==0.5.0 -jupyter-client==8.0.1 -jupyter-core==5.1.5 +jupyter-client==8.0.2 +jupyter-core==5.2.0 +jupyter-events==0.5.0 jupyter-server==1.23.5 -jupyterlab==3.5.3 +jupyter-server-fileid==0.6.0 +jupyter-server-ydoc==0.6.1 +jupyter-ydoc==0.2.2 +jupyterlab==3.6.1 jupyterlab-code-formatter==1.5.3 jupyterlab-markup==1.1.0 jupyterlab-myst==0.1.6 ; python_version >= "3.7.0" @@ -85,16 +95,16 @@ matplotlib-inline==0.1.6 mccabe==0.7.0 mdit-py-plugins==0.3.3 mdurl==0.1.2 -mistune==2.0.4 -mypy==0.991 -mypy-extensions==0.4.3 -myst-nb==0.17.1 ; python_version >= "3.8.0" +mistune==2.0.5 +mypy==1.0.0 +mypy-extensions==1.0.0 +myst-nb==0.17.1 myst-parser==0.18.1 nbclassic==0.5.1 nbclient==0.5.13 nbconvert==7.2.9 nbformat==5.7.3 -nbmake==1.3.0 +nbmake==1.2.1 nest-asyncio==1.5.6 nodeenv==1.7.0 notebook==6.5.2 @@ -102,14 +112,14 @@ notebook-shim==0.2.2 packaging==23.0 pandocfilters==1.5.0 parso==0.8.3 -particle==0.21.1 +particle==0.21.2 pathspec==0.11.0 -pep8-naming==0.13.3 +pep8-naming==0.13.3 ; python_version >= "3.8.0" pexpect==4.8.0 pickleshare==0.7.5 platformdirs==2.6.2 pluggy==1.0.0 -pre-commit==3.0.1 +pre-commit==3.0.4 prometheus-client==0.16.0 prompt-toolkit==3.0.36 psutil==5.9.4 @@ -125,21 +135,24 @@ pydocstyle==6.3.0 pydot==1.4.2 pyflakes==3.0.1 pygments==2.14.0 -pylint==2.15.10 +pylint==2.16.1 pyparsing==3.0.9 pyproject-api==1.5.0 pyrsistent==0.19.3 pytest==7.2.1 pytest-cov==4.0.0 pytest-profiling==1.7.0 -pytest-xdist==3.1.0 +pytest-xdist==3.2.0 python-constraint==1.4.0 python-dateutil==2.8.2 +python-json-logger==2.0.4 pytz==2022.7.1 pyyaml==6.0 pyzmq==25.0.0 requests==2.28.2 restructuredtext-lint==1.4.0 +rfc3339-validator==0.1.4 +rfc3986-validator==0.1.1 send2trash==1.8.0 six==1.16.0 sniffio==1.3.0 @@ -148,7 +161,7 @@ soupsieve==2.3.2.post1 sphinx==4.5.0 sphinx-autobuild==2021.3.14 sphinx-book-theme==0.3.3 -sphinx-codeautolink==0.14.0 +sphinx-codeautolink==0.14.1 sphinx-comments==0.0.3 sphinx-copybutton==0.5.1 sphinx-design==0.3.0 @@ -158,7 +171,7 @@ sphinxcontrib-applehelp==1.0.4 sphinxcontrib-bibtex==2.5.0 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-hep-pdgref==0.1.4 -sphinxcontrib-htmlhelp==2.0.0 +sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 @@ -171,24 +184,28 @@ tinycss2==1.2.1 tomli==2.0.1 tomlkit==0.11.6 tornado==6.2 -tox==4.4.2 +tox==4.4.4 tqdm==4.64.1 -traitlets==5.8.1 -types-docutils==0.19.1.2 +traitlets==5.9.0 +types-docutils==0.19.1.3 types-pkg-resources==0.1.3 -types-pyyaml==6.0.12.3 -types-requests==2.28.11.8 -types-setuptools==65.7.0.3 -types-urllib3==1.26.25.4 +types-pyyaml==6.0.12.4 +types-requests==2.28.11.12 +types-setuptools==67.1.0.2 +types-urllib3==1.26.25.5 typing-extensions==4.4.0 +uri-template==1.2.0 urllib3==1.26.14 -virtualenv==20.17.1 +virtualenv==20.18.0 wcwidth==0.2.6 +webcolors==1.12 webencodings==0.5.1 -websocket-client==1.5.0 +websocket-client==1.5.1 wheel==0.38.4 wrapt==1.14.1 -zipp==3.12.0 +y-py==0.5.5 +ypy-websocket==0.8.2 +zipp==3.12.1 # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/.constraints/py3.11.txt b/.constraints/py3.11.txt index 4453a660..b32dcfd3 100644 --- a/.constraints/py3.11.txt +++ b/.constraints/py3.11.txt @@ -4,18 +4,21 @@ # # pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.11.txt --strip-extras setup.py # +aiofiles==22.1.0 +aiosqlite==0.18.0 alabaster==0.7.13 anyio==3.6.2 aquirdturtle-collapsible-headings==3.1.0 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 -astroid==2.13.3 +arrow==1.2.3 +astroid==2.14.1 asttokens==2.2.1 attrs==22.2.0 babel==2.11.0 backcall==0.2.0 -beautifulsoup4==4.11.1 -black==22.12.0 +beautifulsoup4==4.11.2 +black==23.1.0 bleach==6.0.0 cachetools==5.3.0 certifi==2022.12.7 @@ -37,39 +40,46 @@ execnet==1.9.0 executing==1.2.0 fastjsonschema==2.16.2 filelock==3.9.0 -flake8==6.0.0 -flake8-blind-except==0.2.1 -flake8-bugbear==23.1.20 -flake8-builtins==2.1.0 -flake8-comprehensions==3.10.1 -flake8-future-import==0.4.7 +flake8==6.0.0 ; python_version >= "3.8.0" +flake8-blind-except==0.2.1 ; python_version >= "3.8.0" +flake8-bugbear==23.1.20 ; python_version >= "3.8.0" +flake8-builtins==2.1.0 ; python_version >= "3.8.0" +flake8-comprehensions==3.10.1 ; python_version >= "3.8.0" +flake8-future-import==0.4.7 ; python_version >= "3.8.0" flake8-plugin-utils==1.3.2 -flake8-pytest-style==1.6.0 -flake8-rst-docstrings==0.3.0 +flake8-pytest-style==1.6.0 ; python_version >= "3.8.0" +flake8-rst-docstrings==0.3.0 ; python_version >= "3.8.0" flake8-type-ignore==0.1.0.post2 ; python_version >= "3.8.0" -flake8-use-fstring==1.4 +flake8-use-fstring==1.4 ; python_version >= "3.8.0" +fqdn==1.5.1 gprof2dot==2022.7.29 graphviz==0.20.1 greenlet==2.0.2 hepunits==2.3.1 -identify==2.5.15 +identify==2.5.17 idna==3.4 imagesize==1.4.1 importlib-metadata==6.0.0 iniconfig==2.0.0 -ipykernel==6.20.2 +ipykernel==6.21.1 ipython==8.9.0 ipython-genutils==0.2.0 +isoduration==20.11.0 isort==5.12.0 jedi==0.18.2 jinja2==3.1.2 json5==0.9.11 +jsonpointer==2.3 jsonschema==4.17.3 jupyter-cache==0.5.0 -jupyter-client==8.0.1 -jupyter-core==5.1.5 +jupyter-client==8.0.2 +jupyter-core==5.2.0 +jupyter-events==0.5.0 jupyter-server==1.23.5 -jupyterlab==3.5.3 +jupyter-server-fileid==0.6.0 +jupyter-server-ydoc==0.6.1 +jupyter-ydoc==0.2.2 +jupyterlab==3.6.1 jupyterlab-code-formatter==1.5.3 jupyterlab-markup==1.1.0 jupyterlab-myst==0.1.6 ; python_version >= "3.7.0" @@ -84,16 +94,16 @@ matplotlib-inline==0.1.6 mccabe==0.7.0 mdit-py-plugins==0.3.3 mdurl==0.1.2 -mistune==2.0.4 -mypy==0.991 -mypy-extensions==0.4.3 -myst-nb==0.17.1 ; python_version >= "3.8.0" +mistune==2.0.5 +mypy==1.0.0 +mypy-extensions==1.0.0 +myst-nb==0.17.1 myst-parser==0.18.1 nbclassic==0.5.1 nbclient==0.5.13 nbconvert==7.2.9 nbformat==5.7.3 -nbmake==1.3.0 +nbmake==1.2.1 nest-asyncio==1.5.6 nodeenv==1.7.0 notebook==6.5.2 @@ -101,14 +111,14 @@ notebook-shim==0.2.2 packaging==23.0 pandocfilters==1.5.0 parso==0.8.3 -particle==0.21.1 +particle==0.21.2 pathspec==0.11.0 -pep8-naming==0.13.3 +pep8-naming==0.13.3 ; python_version >= "3.8.0" pexpect==4.8.0 pickleshare==0.7.5 platformdirs==2.6.2 pluggy==1.0.0 -pre-commit==3.0.1 +pre-commit==3.0.4 prometheus-client==0.16.0 prompt-toolkit==3.0.36 psutil==5.9.4 @@ -124,21 +134,24 @@ pydocstyle==6.3.0 pydot==1.4.2 pyflakes==3.0.1 pygments==2.14.0 -pylint==2.15.10 +pylint==2.16.1 pyparsing==3.0.9 pyproject-api==1.5.0 pyrsistent==0.19.3 pytest==7.2.1 pytest-cov==4.0.0 pytest-profiling==1.7.0 -pytest-xdist==3.1.0 +pytest-xdist==3.2.0 python-constraint==1.4.0 python-dateutil==2.8.2 +python-json-logger==2.0.4 pytz==2022.7.1 pyyaml==6.0 pyzmq==25.0.0 requests==2.28.2 restructuredtext-lint==1.4.0 +rfc3339-validator==0.1.4 +rfc3986-validator==0.1.1 send2trash==1.8.0 six==1.16.0 sniffio==1.3.0 @@ -147,7 +160,7 @@ soupsieve==2.3.2.post1 sphinx==4.5.0 sphinx-autobuild==2021.3.14 sphinx-book-theme==0.3.3 -sphinx-codeautolink==0.14.0 +sphinx-codeautolink==0.14.1 sphinx-comments==0.0.3 sphinx-copybutton==0.5.1 sphinx-design==0.3.0 @@ -157,7 +170,7 @@ sphinxcontrib-applehelp==1.0.4 sphinxcontrib-bibtex==2.5.0 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-hep-pdgref==0.1.4 -sphinxcontrib-htmlhelp==2.0.0 +sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 @@ -167,27 +180,30 @@ stack-data==0.6.2 tabulate==0.9.0 terminado==0.17.1 tinycss2==1.2.1 -tomli==2.0.1 tomlkit==0.11.6 tornado==6.2 -tox==4.4.2 +tox==4.4.4 tqdm==4.64.1 -traitlets==5.8.1 -types-docutils==0.19.1.2 +traitlets==5.9.0 +types-docutils==0.19.1.3 types-pkg-resources==0.1.3 -types-pyyaml==6.0.12.3 -types-requests==2.28.11.8 -types-setuptools==65.7.0.3 -types-urllib3==1.26.25.4 +types-pyyaml==6.0.12.4 +types-requests==2.28.11.12 +types-setuptools==67.1.0.2 +types-urllib3==1.26.25.5 typing-extensions==4.4.0 +uri-template==1.2.0 urllib3==1.26.14 -virtualenv==20.17.1 +virtualenv==20.18.0 wcwidth==0.2.6 +webcolors==1.12 webencodings==0.5.1 -websocket-client==1.5.0 +websocket-client==1.5.1 wheel==0.38.4 wrapt==1.14.1 -zipp==3.12.0 +y-py==0.5.5 +ypy-websocket==0.8.2 +zipp==3.12.1 # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/.constraints/py3.6.txt b/.constraints/py3.6.txt index 0262b4dc..a0a8e760 100644 --- a/.constraints/py3.6.txt +++ b/.constraints/py3.6.txt @@ -14,7 +14,7 @@ async-generator==1.10 attrs==21.4.0 babel==2.11.0 backcall==0.2.0 -beautifulsoup4==4.11.1 +beautifulsoup4==4.11.2 black==22.8.0 bleach==4.1.0 certifi==2022.12.7 @@ -34,16 +34,6 @@ docutils==0.16 entrypoints==0.4 execnet==1.9.0 filelock==3.4.1 -flake8==4.0.1 -flake8-blind-except==0.2.1 -flake8-bugbear==22.9.23 -flake8-builtins==2.0.0 -flake8-comprehensions==3.7.0 -flake8-future-import==0.4.7 -flake8-plugin-utils==1.3.2 -flake8-pytest-style==1.6.0 -flake8-rst-docstrings==0.2.5 -flake8-use-fstring==1.4 gitdb==4.0.9 gitpython==3.1.18 gprof2dot==2022.7.29 @@ -54,7 +44,7 @@ identify==2.4.4 idna==3.4 imagesize==1.4.1 immutables==0.19 -importlib-metadata==4.2.0 ; python_version < "3.8.0" +importlib-metadata==4.8.3 ; python_version < "3.8.0" importlib-resources==3.0.0 iniconfig==1.1.1 ipykernel==5.5.6 @@ -75,19 +65,19 @@ jupyter-sphinx==0.3.2 jupyterlab==3.2.9 jupyterlab-code-formatter==1.5.3 jupyterlab-pygments==0.1.2 -jupyterlab-server==2.10.3 ; python_version < "3.8.0" +jupyterlab-server==2.10.3 jupyterlab-widgets==1.1.1 latexcodec==2.0.1 lazy-object-proxy==1.7.1 livereload==2.6.3 markdown-it-py==1.1.0 markupsafe==2.0.1 -mccabe==0.6.1 +mccabe==0.7.0 mdit-py-plugins==0.2.8 mistune==0.8.4 mypy==0.971 -mypy-extensions==0.4.3 -myst-nb==0.13.2 ; python_version < "3.8.0" +mypy-extensions==1.0.0 +myst-nb==0.13.2 myst-parser==0.15.2 nbclassic==0.3.5 nbclient==0.5.9 @@ -103,7 +93,6 @@ pandocfilters==1.5.0 parso==0.7.1 particle==0.20.1 pathspec==0.9.0 -pep8-naming==0.13.1 pexpect==4.8.0 pickleshare==0.7.5 platformdirs==2.4.0 @@ -115,13 +104,11 @@ ptyprocess==0.7.0 py==1.11.0 pybtex==0.24.0 pybtex-docutils==1.0.2 -pycodestyle==2.8.0 pycparser==2.21 pydantic==1.9.2 pydata-sphinx-theme==0.7.2 pydocstyle==6.3.0 pydot==1.4.2 -pyflakes==2.4.0 pygments==2.14.0 pylint==2.13.9 pyparsing==3.0.9 @@ -136,14 +123,13 @@ pytz==2022.7.1 pyyaml==6.0 pyzmq==25.0.0 requests==2.27.1 -restructuredtext-lint==1.4.0 send2trash==1.8.0 six==1.16.0 smmap==5.0.0 sniffio==1.2.0 snowballstemmer==2.2.0 soupsieve==2.3.2.post1 -sphinx==4.3.2 ; python_version < "3.8.0" +sphinx==4.5.0 sphinx-autobuild==2021.3.14 sphinx-book-theme==0.2.0 sphinx-codeautolink==0.12.1 @@ -171,15 +157,15 @@ tox==3.28.0 ; python_version < "3.8.0" tqdm==4.64.1 traitlets==4.3.3 typed-ast==1.5.4 -types-docutils==0.19.1.2 +types-docutils==0.19.1.3 types-pkg-resources==0.1.3 -types-pyyaml==6.0.12.3 -types-requests==2.28.11.8 -types-setuptools==65.7.0.3 -types-urllib3==1.26.25.4 +types-pyyaml==6.0.12.4 +types-requests==2.28.11.12 +types-setuptools==67.1.0.2 +types-urllib3==1.26.25.5 typing-extensions==4.1.1 ; python_version < "3.10.0" urllib3==1.26.14 -virtualenv==20.15.1 ; python_version < "3.8.0" +virtualenv==20.15.1 ; python_version < "3.7.0" wcwidth==0.2.6 webencodings==0.5.1 websocket-client==1.3.1 diff --git a/.constraints/py3.7.txt b/.constraints/py3.7.txt index fd2fdb18..bf99d4c5 100644 --- a/.constraints/py3.7.txt +++ b/.constraints/py3.7.txt @@ -4,18 +4,22 @@ # # pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.7.txt --strip-extras setup.py # +aiofiles==22.1.0 +aiosqlite==0.18.0 alabaster==0.7.13 anyio==3.6.2 aquirdturtle-collapsible-headings==3.1.0 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 -astroid==2.13.3 -attrs==21.4.0 +arrow==1.2.3 +astroid==2.14.1 +attrs==22.2.0 babel==2.11.0 backcall==0.2.0 -beautifulsoup4==4.11.1 -black==22.12.0 +beautifulsoup4==4.11.2 +black==23.1.0 bleach==6.0.0 +cached-property==1.5.2 certifi==2022.12.7 cffi==1.15.1 cfgv==3.3.1 @@ -34,70 +38,60 @@ exceptiongroup==1.1.0 execnet==1.9.0 fastjsonschema==2.16.2 filelock==3.9.0 -flake8==5.0.4 -flake8-blind-except==0.2.1 -flake8-bugbear==23.1.20 -flake8-builtins==2.1.0 -flake8-comprehensions==3.10.1 -flake8-future-import==0.4.7 -flake8-plugin-utils==1.3.2 -flake8-pytest-style==1.6.0 -flake8-rst-docstrings==0.3.0 -flake8-use-fstring==1.4 -gitdb==4.0.10 -gitpython==3.1.30 +fqdn==1.5.1 gprof2dot==2022.7.29 graphviz==0.20.1 greenlet==2.0.2 hepunits==2.3.1 -identify==2.5.15 +identify==2.5.17 idna==3.4 imagesize==1.4.1 -importlib-metadata==4.2.0 ; python_version < "3.8.0" +importlib-metadata==4.13.0 ; python_version < "3.8.0" importlib-resources==5.10.2 iniconfig==2.0.0 ipykernel==6.16.2 ipython==7.34.0 ipython-genutils==0.2.0 -ipywidgets==7.7.2 -isort==5.11.4 +isoduration==20.11.0 +isort==5.11.5 jedi==0.18.2 jinja2==3.1.2 json5==0.9.11 +jsonpointer==2.3 jsonschema==4.17.3 -jupyter-cache==0.4.3 +jupyter-cache==0.5.0 jupyter-client==7.4.9 jupyter-core==4.12.0 +jupyter-events==0.5.0 jupyter-server==1.23.5 -jupyter-server-mathjax==0.2.6 -jupyter-sphinx==0.3.2 -jupyterlab==3.5.3 +jupyter-server-fileid==0.6.0 +jupyter-server-ydoc==0.6.1 +jupyter-ydoc==0.2.2 +jupyterlab==3.6.1 jupyterlab-code-formatter==1.5.3 jupyterlab-markup==1.1.0 jupyterlab-myst==0.1.6 ; python_version >= "3.7.0" jupyterlab-pygments==0.2.2 -jupyterlab-server==2.15.2 ; python_version < "3.8.0" -jupyterlab-widgets==1.1.1 +jupyterlab-server==2.19.0 latexcodec==2.0.1 lazy-object-proxy==1.9.0 livereload==2.6.3 -lxml==4.9.2 -markdown-it-py==1.1.0 +markdown-it-py==2.1.0 markupsafe==2.1.2 matplotlib-inline==0.1.6 mccabe==0.7.0 -mdit-py-plugins==0.2.8 -mistune==0.8.4 -mypy==0.991 -mypy-extensions==0.4.3 -myst-nb==0.13.2 ; python_version < "3.8.0" -myst-parser==0.15.2 +mdit-py-plugins==0.3.3 +mdurl==0.1.2 +mistune==2.0.5 +mypy==1.0.0 +mypy-extensions==1.0.0 +myst-nb==0.17.1 +myst-parser==0.18.1 nbclassic==0.5.1 nbclient==0.5.13 -nbconvert==6.5.4 -nbdime==3.1.1 +nbconvert==7.2.9 nbformat==5.7.3 -nbmake==1.3.0 +nbmake==1.2.1 nest-asyncio==1.5.6 nodeenv==1.7.0 notebook==6.5.2 @@ -105,9 +99,8 @@ notebook-shim==0.2.2 packaging==23.0 pandocfilters==1.5.0 parso==0.8.3 -particle==0.21.1 +particle==0.21.2 pathspec==0.11.0 -pep8-naming==0.13.3 pexpect==4.8.0 pickleshare==0.7.5 pkgutil-resolve-name==1.3.10 @@ -121,38 +114,37 @@ ptyprocess==0.7.0 py==1.11.0 pybtex==0.24.0 pybtex-docutils==1.0.2 -pycodestyle==2.9.1 pycparser==2.21 pydantic==1.10.4 pydata-sphinx-theme==0.8.1 pydocstyle==6.3.0 pydot==1.4.2 -pyflakes==2.5.0 pygments==2.14.0 -pylint==2.15.10 +pylint==2.16.1 pyparsing==3.0.9 pyrsistent==0.19.3 pytest==7.2.1 pytest-cov==4.0.0 pytest-profiling==1.7.0 -pytest-xdist==3.1.0 +pytest-xdist==3.2.0 python-constraint==1.4.0 python-dateutil==2.8.2 +python-json-logger==2.0.4 pytz==2022.7.1 pyyaml==6.0 pyzmq==25.0.0 requests==2.28.2 -restructuredtext-lint==1.4.0 +rfc3339-validator==0.1.4 +rfc3986-validator==0.1.1 send2trash==1.8.0 six==1.16.0 -smmap==5.0.0 sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.3.2.post1 -sphinx==4.3.2 ; python_version < "3.8.0" +sphinx==4.5.0 sphinx-autobuild==2021.3.14 sphinx-book-theme==0.3.3 -sphinx-codeautolink==0.14.0 +sphinx-codeautolink==0.14.1 sphinx-comments==0.0.3 sphinx-copybutton==0.5.1 sphinx-design==0.3.0 @@ -168,6 +160,7 @@ sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 sphobjinv==2.3.1 sqlalchemy==1.4.46 +tabulate==0.9.0 terminado==0.17.1 tinycss2==1.2.1 tomli==2.0.1 @@ -175,24 +168,27 @@ tomlkit==0.11.6 tornado==6.2 tox==3.28.0 ; python_version < "3.8.0" tqdm==4.64.1 -traitlets==5.8.1 +traitlets==5.9.0 typed-ast==1.5.4 -types-docutils==0.19.1.2 +types-docutils==0.19.1.3 types-pkg-resources==0.1.3 -types-pyyaml==6.0.12.3 -types-requests==2.28.11.8 -types-setuptools==65.7.0.3 -types-urllib3==1.26.25.4 +types-pyyaml==6.0.12.4 +types-requests==2.28.11.12 +types-setuptools==67.1.0.2 +types-urllib3==1.26.25.5 typing-extensions==4.4.0 ; python_version < "3.10.0" +uri-template==1.2.0 urllib3==1.26.14 -virtualenv==20.15.1 ; python_version < "3.8.0" +virtualenv==20.18.0 wcwidth==0.2.6 +webcolors==1.12 webencodings==0.5.1 -websocket-client==1.5.0 +websocket-client==1.5.1 wheel==0.38.4 -widgetsnbextension==3.6.1 wrapt==1.14.1 -zipp==3.12.0 +y-py==0.5.5 +ypy-websocket==0.8.2 +zipp==3.12.1 # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index 38b451bd..70c3e650 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -4,18 +4,21 @@ # # pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.8.txt --strip-extras setup.py # +aiofiles==22.1.0 +aiosqlite==0.18.0 alabaster==0.7.13 anyio==3.6.2 aquirdturtle-collapsible-headings==3.1.0 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 -astroid==2.13.3 +arrow==1.2.3 +astroid==2.14.1 asttokens==2.2.1 attrs==22.2.0 babel==2.11.0 backcall==0.2.0 -beautifulsoup4==4.11.1 -black==22.12.0 +beautifulsoup4==4.11.2 +black==23.1.0 bleach==6.0.0 cachetools==5.3.0 certifi==2022.12.7 @@ -38,40 +41,47 @@ execnet==1.9.0 executing==1.2.0 fastjsonschema==2.16.2 filelock==3.9.0 -flake8==6.0.0 -flake8-blind-except==0.2.1 -flake8-bugbear==23.1.20 -flake8-builtins==2.1.0 -flake8-comprehensions==3.10.1 -flake8-future-import==0.4.7 +flake8==6.0.0 ; python_version >= "3.8.0" +flake8-blind-except==0.2.1 ; python_version >= "3.8.0" +flake8-bugbear==23.1.20 ; python_version >= "3.8.0" +flake8-builtins==2.1.0 ; python_version >= "3.8.0" +flake8-comprehensions==3.10.1 ; python_version >= "3.8.0" +flake8-future-import==0.4.7 ; python_version >= "3.8.0" flake8-plugin-utils==1.3.2 -flake8-pytest-style==1.6.0 -flake8-rst-docstrings==0.3.0 +flake8-pytest-style==1.6.0 ; python_version >= "3.8.0" +flake8-rst-docstrings==0.3.0 ; python_version >= "3.8.0" flake8-type-ignore==0.1.0.post2 ; python_version >= "3.8.0" -flake8-use-fstring==1.4 +flake8-use-fstring==1.4 ; python_version >= "3.8.0" +fqdn==1.5.1 gprof2dot==2022.7.29 graphviz==0.20.1 greenlet==2.0.2 hepunits==2.3.1 -identify==2.5.15 +identify==2.5.17 idna==3.4 imagesize==1.4.1 importlib-metadata==6.0.0 importlib-resources==5.10.2 iniconfig==2.0.0 -ipykernel==6.20.2 +ipykernel==6.21.1 ipython==8.9.0 ipython-genutils==0.2.0 +isoduration==20.11.0 isort==5.12.0 jedi==0.18.2 jinja2==3.1.2 json5==0.9.11 +jsonpointer==2.3 jsonschema==4.17.3 jupyter-cache==0.5.0 -jupyter-client==8.0.1 -jupyter-core==5.1.5 +jupyter-client==8.0.2 +jupyter-core==5.2.0 +jupyter-events==0.5.0 jupyter-server==1.23.5 -jupyterlab==3.5.3 +jupyter-server-fileid==0.6.0 +jupyter-server-ydoc==0.6.1 +jupyter-ydoc==0.2.2 +jupyterlab==3.6.1 jupyterlab-code-formatter==1.5.3 jupyterlab-markup==1.1.0 jupyterlab-myst==0.1.6 ; python_version >= "3.7.0" @@ -86,16 +96,16 @@ matplotlib-inline==0.1.6 mccabe==0.7.0 mdit-py-plugins==0.3.3 mdurl==0.1.2 -mistune==2.0.4 -mypy==0.991 -mypy-extensions==0.4.3 -myst-nb==0.17.1 ; python_version >= "3.8.0" +mistune==2.0.5 +mypy==1.0.0 +mypy-extensions==1.0.0 +myst-nb==0.17.1 myst-parser==0.18.1 nbclassic==0.5.1 nbclient==0.5.13 nbconvert==7.2.9 nbformat==5.7.3 -nbmake==1.3.0 +nbmake==1.2.1 nest-asyncio==1.5.6 nodeenv==1.7.0 notebook==6.5.2 @@ -103,15 +113,15 @@ notebook-shim==0.2.2 packaging==23.0 pandocfilters==1.5.0 parso==0.8.3 -particle==0.21.1 +particle==0.21.2 pathspec==0.11.0 -pep8-naming==0.13.3 +pep8-naming==0.13.3 ; python_version >= "3.8.0" pexpect==4.8.0 pickleshare==0.7.5 pkgutil-resolve-name==1.3.10 platformdirs==2.6.2 pluggy==1.0.0 -pre-commit==3.0.1 +pre-commit==3.0.4 prometheus-client==0.16.0 prompt-toolkit==3.0.36 psutil==5.9.4 @@ -127,21 +137,24 @@ pydocstyle==6.3.0 pydot==1.4.2 pyflakes==3.0.1 pygments==2.14.0 -pylint==2.15.10 +pylint==2.16.1 pyparsing==3.0.9 pyproject-api==1.5.0 pyrsistent==0.19.3 pytest==7.2.1 pytest-cov==4.0.0 pytest-profiling==1.7.0 -pytest-xdist==3.1.0 +pytest-xdist==3.2.0 python-constraint==1.4.0 python-dateutil==2.8.2 +python-json-logger==2.0.4 pytz==2022.7.1 pyyaml==6.0 pyzmq==25.0.0 requests==2.28.2 restructuredtext-lint==1.4.0 +rfc3339-validator==0.1.4 +rfc3986-validator==0.1.1 send2trash==1.8.0 six==1.16.0 sniffio==1.3.0 @@ -150,7 +163,7 @@ soupsieve==2.3.2.post1 sphinx==4.5.0 sphinx-autobuild==2021.3.14 sphinx-book-theme==0.3.3 -sphinx-codeautolink==0.14.0 +sphinx-codeautolink==0.14.1 sphinx-comments==0.0.3 sphinx-copybutton==0.5.1 sphinx-design==0.3.0 @@ -160,7 +173,7 @@ sphinxcontrib-applehelp==1.0.4 sphinxcontrib-bibtex==2.5.0 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-hep-pdgref==0.1.4 -sphinxcontrib-htmlhelp==2.0.0 +sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 @@ -173,24 +186,28 @@ tinycss2==1.2.1 tomli==2.0.1 tomlkit==0.11.6 tornado==6.2 -tox==4.4.2 +tox==4.4.4 tqdm==4.64.1 -traitlets==5.8.1 -types-docutils==0.19.1.2 +traitlets==5.9.0 +types-docutils==0.19.1.3 types-pkg-resources==0.1.3 -types-pyyaml==6.0.12.3 -types-requests==2.28.11.8 -types-setuptools==65.7.0.3 -types-urllib3==1.26.25.4 +types-pyyaml==6.0.12.4 +types-requests==2.28.11.12 +types-setuptools==67.1.0.2 +types-urllib3==1.26.25.5 typing-extensions==4.4.0 ; python_version < "3.10.0" +uri-template==1.2.0 urllib3==1.26.14 -virtualenv==20.17.1 +virtualenv==20.18.0 wcwidth==0.2.6 +webcolors==1.12 webencodings==0.5.1 -websocket-client==1.5.0 +websocket-client==1.5.1 wheel==0.38.4 wrapt==1.14.1 -zipp==3.12.0 +y-py==0.5.5 +ypy-websocket==0.8.2 +zipp==3.12.1 # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index a11c8e79..ebf40de1 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -4,18 +4,21 @@ # # pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.9.txt --strip-extras setup.py # +aiofiles==22.1.0 +aiosqlite==0.18.0 alabaster==0.7.13 anyio==3.6.2 aquirdturtle-collapsible-headings==3.1.0 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 -astroid==2.13.3 +arrow==1.2.3 +astroid==2.14.1 asttokens==2.2.1 attrs==22.2.0 babel==2.11.0 backcall==0.2.0 -beautifulsoup4==4.11.1 -black==22.12.0 +beautifulsoup4==4.11.2 +black==23.1.0 bleach==6.0.0 cachetools==5.3.0 certifi==2022.12.7 @@ -38,39 +41,46 @@ execnet==1.9.0 executing==1.2.0 fastjsonschema==2.16.2 filelock==3.9.0 -flake8==6.0.0 -flake8-blind-except==0.2.1 -flake8-bugbear==23.1.20 -flake8-builtins==2.1.0 -flake8-comprehensions==3.10.1 -flake8-future-import==0.4.7 +flake8==6.0.0 ; python_version >= "3.8.0" +flake8-blind-except==0.2.1 ; python_version >= "3.8.0" +flake8-bugbear==23.1.20 ; python_version >= "3.8.0" +flake8-builtins==2.1.0 ; python_version >= "3.8.0" +flake8-comprehensions==3.10.1 ; python_version >= "3.8.0" +flake8-future-import==0.4.7 ; python_version >= "3.8.0" flake8-plugin-utils==1.3.2 -flake8-pytest-style==1.6.0 -flake8-rst-docstrings==0.3.0 +flake8-pytest-style==1.6.0 ; python_version >= "3.8.0" +flake8-rst-docstrings==0.3.0 ; python_version >= "3.8.0" flake8-type-ignore==0.1.0.post2 ; python_version >= "3.8.0" -flake8-use-fstring==1.4 +flake8-use-fstring==1.4 ; python_version >= "3.8.0" +fqdn==1.5.1 gprof2dot==2022.7.29 graphviz==0.20.1 greenlet==2.0.2 hepunits==2.3.1 -identify==2.5.15 +identify==2.5.17 idna==3.4 imagesize==1.4.1 importlib-metadata==6.0.0 iniconfig==2.0.0 -ipykernel==6.20.2 +ipykernel==6.21.1 ipython==8.9.0 ipython-genutils==0.2.0 +isoduration==20.11.0 isort==5.12.0 jedi==0.18.2 jinja2==3.1.2 json5==0.9.11 +jsonpointer==2.3 jsonschema==4.17.3 jupyter-cache==0.5.0 -jupyter-client==8.0.1 -jupyter-core==5.1.5 +jupyter-client==8.0.2 +jupyter-core==5.2.0 +jupyter-events==0.5.0 jupyter-server==1.23.5 -jupyterlab==3.5.3 +jupyter-server-fileid==0.6.0 +jupyter-server-ydoc==0.6.1 +jupyter-ydoc==0.2.2 +jupyterlab==3.6.1 jupyterlab-code-formatter==1.5.3 jupyterlab-markup==1.1.0 jupyterlab-myst==0.1.6 ; python_version >= "3.7.0" @@ -85,16 +95,16 @@ matplotlib-inline==0.1.6 mccabe==0.7.0 mdit-py-plugins==0.3.3 mdurl==0.1.2 -mistune==2.0.4 -mypy==0.991 -mypy-extensions==0.4.3 -myst-nb==0.17.1 ; python_version >= "3.8.0" +mistune==2.0.5 +mypy==1.0.0 +mypy-extensions==1.0.0 +myst-nb==0.17.1 myst-parser==0.18.1 nbclassic==0.5.1 nbclient==0.5.13 nbconvert==7.2.9 nbformat==5.7.3 -nbmake==1.3.0 +nbmake==1.2.1 nest-asyncio==1.5.6 nodeenv==1.7.0 notebook==6.5.2 @@ -102,14 +112,14 @@ notebook-shim==0.2.2 packaging==23.0 pandocfilters==1.5.0 parso==0.8.3 -particle==0.21.1 +particle==0.21.2 pathspec==0.11.0 -pep8-naming==0.13.3 +pep8-naming==0.13.3 ; python_version >= "3.8.0" pexpect==4.8.0 pickleshare==0.7.5 platformdirs==2.6.2 pluggy==1.0.0 -pre-commit==3.0.1 +pre-commit==3.0.4 prometheus-client==0.16.0 prompt-toolkit==3.0.36 psutil==5.9.4 @@ -125,21 +135,24 @@ pydocstyle==6.3.0 pydot==1.4.2 pyflakes==3.0.1 pygments==2.14.0 -pylint==2.15.10 +pylint==2.16.1 pyparsing==3.0.9 pyproject-api==1.5.0 pyrsistent==0.19.3 pytest==7.2.1 pytest-cov==4.0.0 pytest-profiling==1.7.0 -pytest-xdist==3.1.0 +pytest-xdist==3.2.0 python-constraint==1.4.0 python-dateutil==2.8.2 +python-json-logger==2.0.4 pytz==2022.7.1 pyyaml==6.0 pyzmq==25.0.0 requests==2.28.2 restructuredtext-lint==1.4.0 +rfc3339-validator==0.1.4 +rfc3986-validator==0.1.1 send2trash==1.8.0 six==1.16.0 sniffio==1.3.0 @@ -148,7 +161,7 @@ soupsieve==2.3.2.post1 sphinx==4.5.0 sphinx-autobuild==2021.3.14 sphinx-book-theme==0.3.3 -sphinx-codeautolink==0.14.0 +sphinx-codeautolink==0.14.1 sphinx-comments==0.0.3 sphinx-copybutton==0.5.1 sphinx-design==0.3.0 @@ -158,7 +171,7 @@ sphinxcontrib-applehelp==1.0.4 sphinxcontrib-bibtex==2.5.0 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-hep-pdgref==0.1.4 -sphinxcontrib-htmlhelp==2.0.0 +sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 @@ -171,24 +184,28 @@ tinycss2==1.2.1 tomli==2.0.1 tomlkit==0.11.6 tornado==6.2 -tox==4.4.2 +tox==4.4.4 tqdm==4.64.1 -traitlets==5.8.1 -types-docutils==0.19.1.2 +traitlets==5.9.0 +types-docutils==0.19.1.3 types-pkg-resources==0.1.3 -types-pyyaml==6.0.12.3 -types-requests==2.28.11.8 -types-setuptools==65.7.0.3 -types-urllib3==1.26.25.4 +types-pyyaml==6.0.12.4 +types-requests==2.28.11.12 +types-setuptools==67.1.0.2 +types-urllib3==1.26.25.5 typing-extensions==4.4.0 ; python_version < "3.10.0" +uri-template==1.2.0 urllib3==1.26.14 -virtualenv==20.17.1 +virtualenv==20.18.0 wcwidth==0.2.6 +webcolors==1.12 webencodings==0.5.1 -websocket-client==1.5.0 +websocket-client==1.5.1 wheel==0.38.4 wrapt==1.14.1 -zipp==3.12.0 +y-py==0.5.5 +ypy-websocket==0.8.2 +zipp==3.12.1 # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d959b576..c9e27d41 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -67,7 +67,7 @@ repos: - --py36-plus - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 23.1.0 hooks: - id: black @@ -77,7 +77,7 @@ repos: - id: blacken-docs - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v6.19.2 + rev: v6.22.0 hooks: - id: cspell @@ -168,7 +168,7 @@ repos: - python - repo: https://github.com/ComPWA/mirrors-pyright - rev: v1.1.291 + rev: v1.1.292 hooks: - id: pyright diff --git a/setup.cfg b/setup.cfg index 111baaf0..4e2ffc16 100644 --- a/setup.cfg +++ b/setup.cfg @@ -63,12 +63,8 @@ all = doc = %(viz)s importlib-metadata; python_version <"3.8.0" - ipython!=8.7.0 # https://github.com/ipython/ipython/issues/13845 - myst-nb >=0.14; python_version >="3.8.0" # nb_ configuration prefixes - myst-nb <0.14; python_version <"3.8.0" - nbclient >=0.5.5 # https://github.com/executablebooks/jupyter-book/issues/833 + myst-nb # nb_ configuration prefixes Sphinx >=3 - Sphinx <4.4; python_version <"3.8.0" # https://github.com/ComPWA/qrules/runs/4833302679 sphinx-book-theme sphinx-codeautolink[ipython] sphinx-comments @@ -81,7 +77,9 @@ doc = sphobjinv test = ipython - nbmake <=1.3.0 # https://github.com/ComPWA/qrules/runs/7298068574?check_suite_focus=true#step:3:69 + nbmake + nbmake !=1.3.* # https://github.com/ComPWA/qrules/actions/runs/4116315964/jobs/7106216956#step:3:84 + nbmake !=1.4.* # https://github.com/ComPWA/qrules/actions/runs/4115785437/jobs/7104974879#step:3:82 pydot pytest pytest-cov @@ -91,17 +89,17 @@ format = black isort flake8 = - flake8 >=4 # extend-select - flake8-blind-except - flake8-bugbear - flake8-builtins - flake8-comprehensions - flake8-future-import - flake8-pytest-style - flake8-rst-docstrings + flake8 >=4; python_version >="3.8.0" + flake8-blind-except; python_version >="3.8.0" + flake8-bugbear; python_version >="3.8.0" + flake8-builtins; python_version >="3.8.0" + flake8-comprehensions; python_version >="3.8.0" + flake8-future-import; python_version >="3.8.0" + flake8-pytest-style; python_version >="3.8.0" + flake8-rst-docstrings; python_version >="3.8.0" flake8-type-ignore; python_version >="3.8.0" - flake8-use-fstring - pep8-naming + flake8-use-fstring; python_version >="3.8.0" + pep8-naming; python_version >="3.8.0" mypy = mypy >=0.730 # attrs and error code support types-docutils @@ -124,7 +122,6 @@ jupyter = jupyterlab jupyterlab-code-formatter jupyterlab-myst; python_version >="3.7.0" - jupyterlab-server <2.16; python_version <"3.8.0" # https://github.com/ComPWA/tensorwaves/actions/runs/3366807875/jobs/5583673530#step:3:74 dev = %(all)s %(doc)s @@ -133,8 +130,9 @@ dev = %(test)s sphinx-autobuild tox >=1.9 # for skip_install, use_develop - tox <4; python_version <"3.8.0" # https://github.com/ComPWA/qrules/actions/runs/3635577643/jobs/6178067314#step:3:92 - virtualenv <20.16; python_version <"3.8.0" # https://github.com/ComPWA/qrules/runs/7718388093?check_suite_focus=true#step:3:86 + tox !=4.*; python_version <"3.8.0" # https://github.com/ComPWA/qrules/actions/runs/4116409504/jobs/7106431526#step:3:92 + virtualenv !=20.16.*; python_version <"3.7.0" # https://github.com/ComPWA/qrules/actions/runs/4116487921/jobs/7106603597#step:3:78 + virtualenv !=20.17.*; python_version <"3.7.0" # https://github.com/ComPWA/qrules/actions/runs/4116447949/jobs/7106515800#step:3:78 [options.packages.find] where = src diff --git a/src/qrules/argument_handling.py b/src/qrules/argument_handling.py index 4cc847ce..f999e197 100644 --- a/src/qrules/argument_handling.py +++ b/src/qrules/argument_handling.py @@ -145,9 +145,11 @@ class _CompositeArgumentCreator: def __init__(self, class_type: type) -> None: self.__class_type = class_type self.__extractors = { - class_field.name: _ValueExtractor[EdgeQuantumNumber](class_field.type) - if _is_edge_quantum_number(class_field.type) - else _ValueExtractor[NodeQuantumNumber](class_field.type) + class_field.name: ( + _ValueExtractor[EdgeQuantumNumber](class_field.type) + if _is_edge_quantum_number(class_field.type) + else _ValueExtractor[NodeQuantumNumber](class_field.type) + ) for class_field in attrs.fields(class_type) } diff --git a/src/qrules/particle.py b/src/qrules/particle.py index 51fcb83c..b7c87b92 100644 --- a/src/qrules/particle.py +++ b/src/qrules/particle.py @@ -444,21 +444,27 @@ def create_particle( # pylint: disable=too-many-arguments,too-many-locals charmness=charmness if charmness else template_particle.charmness, bottomness=bottomness if bottomness else template_particle.bottomness, topness=topness if topness else template_particle.topness, - baryon_number=baryon_number - if baryon_number - else template_particle.baryon_number, - electron_lepton_number=electron_lepton_number - if electron_lepton_number - else template_particle.electron_lepton_number, - muon_lepton_number=muon_lepton_number - if muon_lepton_number - else template_particle.muon_lepton_number, - tau_lepton_number=tau_lepton_number - if tau_lepton_number - else template_particle.tau_lepton_number, - isospin=template_particle.isospin - if isospin is None - else template_particle.isospin, + baryon_number=( + baryon_number if baryon_number else template_particle.baryon_number + ), + electron_lepton_number=( + electron_lepton_number + if electron_lepton_number + else template_particle.electron_lepton_number + ), + muon_lepton_number=( + muon_lepton_number + if muon_lepton_number + else template_particle.muon_lepton_number + ), + tau_lepton_number=( + tau_lepton_number + if tau_lepton_number + else template_particle.tau_lepton_number + ), + isospin=( + template_particle.isospin if isospin is None else template_particle.isospin + ), parity=template_particle.parity if parity is None else Parity(parity), c_parity=template_particle.c_parity if c_parity is None else Parity(c_parity), g_parity=template_particle.g_parity if g_parity is None else Parity(g_parity), diff --git a/src/qrules/settings.py b/src/qrules/settings.py index 6b709618..1f8e7cd9 100644 --- a/src/qrules/settings.py +++ b/src/qrules/settings.py @@ -55,15 +55,15 @@ CONSERVATION_LAW_PRIORITIES: Dict[ Union[GraphElementRule, EdgeQNConservationRule, ConservationRule], int ] = { - MassConservation: 10, - ElectronLNConservation: 45, - MuonLNConservation: 44, - TauLNConservation: 43, - BaryonNumberConservation: 90, - StrangenessConservation: 69, - CharmConservation: 70, - BottomnessConservation: 68, - ChargeConservation: 100, + MassConservation: 10, # type: ignore[dict-item] + ElectronLNConservation: 45, # type: ignore[dict-item] + MuonLNConservation: 44, # type: ignore[dict-item] + TauLNConservation: 43, # type: ignore[dict-item] + BaryonNumberConservation: 90, # type: ignore[dict-item] + StrangenessConservation: 69, # type: ignore[dict-item] + CharmConservation: 70, # type: ignore[dict-item] + BottomnessConservation: 68, # type: ignore[dict-item] + ChargeConservation: 100, # type: ignore[dict-item] spin_conservation: 8, spin_magnitude_conservation: 8, parity_conservation: 6, diff --git a/src/qrules/solving.py b/src/qrules/solving.py index bb9ff057..2bec8647 100644 --- a/src/qrules/solving.py +++ b/src/qrules/solving.py @@ -472,9 +472,9 @@ def __init__(self, allowed_intermediate_particles: List[GraphEdgePropertyMap]): self.__node_rules: Dict[int, Set[Rule]] = defaultdict(set) self.__non_executable_node_rules: Dict[int, Set[Rule]] = defaultdict(set) self.__edge_rules: Dict[int, Set[GraphElementRule]] = defaultdict(set) - self.__non_executable_edge_rules: Dict[ - int, Set[GraphElementRule] - ] = defaultdict(set) + self.__non_executable_edge_rules: Dict[int, Set[GraphElementRule]] = ( + defaultdict(set) + ) self.__problem = Problem(BacktrackingSolver(True)) self.__allowed_intermediate_particles = allowed_intermediate_particles self.__scoresheet = Scoresheet() @@ -590,9 +590,11 @@ def get_rules_by_priority( ) -> List[Rule]: # first add priorities to the entries priority_list = [ - (x, graph_element_settings.rule_priorities[type(x)]) - if type(x) in graph_element_settings.rule_priorities - else (x, 1) + ( + (x, graph_element_settings.rule_priorities[type(x)]) # type: ignore[index] + if type(x) in graph_element_settings.rule_priorities + else (x, 1) + ) for x in graph_element_settings.conservation_rules ] # then sort according to priority @@ -610,9 +612,7 @@ def get_rules_by_priority( edge_qns, node_qns = get_required_qns(rule) edge_vars, fixed_edge_vars = self.__create_edge_variables( - [ - edge_id, - ], + [edge_id], edge_qns, problem_set, ) @@ -881,9 +881,9 @@ def __initialize_variable_containers( """ self.__qns.update(list(fixed_variables.values())[0]) for element_id, qn_type in variables: - self.__var_string_to_data[ - _create_variable_string(element_id, qn_type) - ] = qn_type + self.__var_string_to_data[_create_variable_string(element_id, qn_type)] = ( + qn_type + ) self.__qns.update({qn_type: None}) def __call__( diff --git a/src/qrules/transition.py b/src/qrules/transition.py index cc9060d1..54bb66f0 100644 --- a/src/qrules/transition.py +++ b/src/qrules/transition.py @@ -407,9 +407,9 @@ def create_intermediate_edge_qn_domains() -> Dict: # if a list of intermediate states is given by user, # built a domain based on these states if self.__user_allowed_intermediate_particles: - intermediate_edge_domains: Dict[ - Type[EdgeQuantumNumber], Set - ] = defaultdict(set) + intermediate_edge_domains: Dict[Type[EdgeQuantumNumber], Set] = ( + defaultdict(set) + ) intermediate_edge_domains[EdgeQuantumNumbers.spin_projection].update( self.interaction_type_settings[InteractionType.WEAK][0].qn_domains[ EdgeQuantumNumbers.spin_projection @@ -780,8 +780,8 @@ class StateTransitionCollection(abc.Sequence): final_state: FrozenDict[int, Particle] = field(init=False, repr=False) def __attrs_post_init__(self) -> None: - if not any(self.transitions): - ValueError(f"At least one {StateTransition.__name__} required") + if len(self.transitions) == 0: + raise ValueError(f"At least one {StateTransition.__name__} required") some_transition = next(iter(self.transitions)) topology = some_transition.topology if any(t.topology != topology for t in self.transitions): @@ -890,7 +890,9 @@ class ReactionInfo: def __attrs_post_init__(self) -> None: if len(self.transition_groups) == 0: - ValueError(f"At least one {StateTransitionCollection.__name__} required") + raise ValueError( + f"At least one {StateTransitionCollection.__name__} required" + ) transitions: List[StateTransition] = [] for grouping in self.transition_groups: transitions.extend(sorted(grouping)) diff --git a/tests/unit/test_particle.py b/tests/unit/test_particle.py index 02ef44c7..e4db0de3 100644 --- a/tests/unit/test_particle.py +++ b/tests/unit/test_particle.py @@ -254,9 +254,11 @@ def test_find(self, particle_database: ParticleCollection): ("gama", "'gamma', 'Sigma0', 'Sigma-', 'Sigma+', 'Lambda'"), ( "omega", - "'omega(782)', 'omega(1420)', 'omega(3)(1670)', 'omega(1650)'" - if sys.version_info < (3, 7) - else "'omega(782)', 'omega(3)(1670)', 'omega(1650)'", + ( + "'omega(782)', 'omega(1420)', 'omega(3)(1670)', 'omega(1650)'" + if sys.version_info < (3, 7) + else "'omega(782)', 'omega(3)(1670)', 'omega(1650)'" + ), ), ("p~~", "'p~'"), ("~", "'p~', 'n~'"), diff --git a/tests/unit/test_system_control.py b/tests/unit/test_system_control.py index 8f20b7cf..a2cee71d 100644 --- a/tests/unit/test_system_control.py +++ b/tests/unit/test_system_control.py @@ -148,9 +148,9 @@ def test_external_edge_initialization( { EdgeQuantumNumbers.pid: 411, EdgeQuantumNumbers.mass: 1.86966, - EdgeQuantumNumbers.width: 6.33e-13 - if sys.version_info < (3, 7) - else 6.37e-13, + EdgeQuantumNumbers.width: ( + 6.33e-13 if sys.version_info < (3, 7) else 6.37e-13 + ), EdgeQuantumNumbers.spin_magnitude: 0.0, EdgeQuantumNumbers.spin_projection: 0, EdgeQuantumNumbers.charge: 1,