diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c3976a96fb..631e4b6025 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: ## version = re.search('ruff==([0-9\.]*)', open("constraints.txt").read())[1] ## print(f"rev: v{version}") ##]]] - rev: v0.5.1 + rev: v0.5.6 ##[[[end]]] hooks: # Run the linter. @@ -66,9 +66,9 @@ repos: ## version = re.search('mypy==([0-9\.]*)', open("constraints.txt").read())[1] ## print(f"#========= FROM constraints.txt: v{version} =========") ##]]] - #========= FROM constraints.txt: v1.10.1 ========= + #========= FROM constraints.txt: v1.11.1 ========= ##[[[end]]] - rev: v1.10.1 # MUST match version ^^^^ in constraints.txt (if the mirror is up-to-date) + rev: v1.11.1 # MUST match version ^^^^ in constraints.txt (if the mirror is up-to-date) hooks: - id: mypy additional_dependencies: # versions from constraints.txt @@ -85,12 +85,12 @@ repos: ## print(f"- {pkg}==" + str(re.search(f'\n{pkg}==([0-9\.]*)', constraints)[1])) ##]]] - astunparse==1.6.3 - - attrs==23.2.0 - - black==24.4.2 + - attrs==24.2.0 + - black==24.8.0 - boltons==24.0.0 - cached-property==1.5.2 - click==8.1.7 - - cmake==3.30.0 + - cmake==3.30.2 - cytoolz==0.12.3 - deepdiff==7.0.1 - devtools==0.12.2 @@ -106,13 +106,13 @@ repos: - numpy==1.24.4 - packaging==24.1 - pybind11==2.13.1 - - setuptools==70.2.0 + - setuptools==72.1.0 - tabulate==0.9.0 - typing-extensions==4.12.2 - xxhash==3.0.0 ##[[[end]]] - # Add all type stubs from typeshed - - types-all + - types-tabulate + - types-typed-ast args: [--no-install-types] exclude: | (?x)^( diff --git a/constraints.txt b/constraints.txt index 0ac8cfd324..e5027a922a 100644 --- a/constraints.txt +++ b/constraints.txt @@ -9,35 +9,33 @@ alabaster==0.7.13 # via sphinx annotated-types==0.7.0 # via pydantic asttokens==2.4.1 # via devtools, stack-data astunparse==1.6.3 ; python_version < "3.9" # via dace, gt4py (pyproject.toml) -attrs==23.2.0 # via flake8-bugbear, flake8-eradicate, gt4py (pyproject.toml), hypothesis, jsonschema, referencing +attrs==24.2.0 # via flake8-bugbear, flake8-eradicate, gt4py (pyproject.toml), hypothesis, jsonschema, referencing babel==2.15.0 # via sphinx backcall==0.2.0 # via ipython -black==24.4.2 # via gt4py (pyproject.toml) +black==24.8.0 # via gt4py (pyproject.toml) boltons==24.0.0 # via gt4py (pyproject.toml) -bracex==2.4 # via wcmatch +bracex==2.5 # via wcmatch build==1.2.1 # via pip-tools -bump-my-version==0.24.2 # via -r requirements-dev.in +bump-my-version==0.25.0 # via -r requirements-dev.in cached-property==1.5.2 # via gt4py (pyproject.toml) -cachetools==5.3.3 # via tox +cachetools==5.4.0 # via tox certifi==2024.7.4 # via requests -cffi==1.16.0 # via cryptography cfgv==3.4.0 # via pre-commit chardet==5.2.0 # via tox charset-normalizer==3.3.2 # via requests clang-format==18.1.8 # via -r requirements-dev.in, gt4py (pyproject.toml) click==8.1.7 # via black, bump-my-version, gt4py (pyproject.toml), pip-tools, rich-click -cmake==3.30.0 # via gt4py (pyproject.toml) +cmake==3.30.2 # via gt4py (pyproject.toml) cogapp==3.4.1 # via -r requirements-dev.in colorama==0.4.6 # via tox comm==0.2.2 # via ipykernel contourpy==1.1.1 # via matplotlib -coverage==7.5.4 # via -r requirements-dev.in, pytest-cov -cryptography==42.0.8 # via types-paramiko, types-pyopenssl, types-redis +coverage==7.6.1 # via -r requirements-dev.in, pytest-cov cycler==0.12.1 # via matplotlib cytoolz==0.12.3 # via gt4py (pyproject.toml) dace==0.16.1 # via gt4py (pyproject.toml) darglint==1.8.1 # via -r requirements-dev.in -debugpy==1.8.2 # via ipykernel +debugpy==1.8.5 # via ipykernel decorator==5.1.1 # via ipython deepdiff==7.0.1 # via gt4py (pyproject.toml) devtools==0.12.2 # via gt4py (pyproject.toml) @@ -45,14 +43,14 @@ dill==0.3.8 # via dace distlib==0.3.8 # via virtualenv docutils==0.20.1 # via restructuredtext-lint, sphinx, sphinx-rtd-theme eradicate==2.3.0 # via flake8-eradicate -exceptiongroup==1.2.1 # via hypothesis, pytest +exceptiongroup==1.2.2 # via hypothesis, pytest execnet==2.1.1 # via pytest-cache, pytest-xdist executing==2.0.1 # via devtools, stack-data factory-boy==3.3.0 # via gt4py (pyproject.toml), pytest-factoryboy -faker==26.0.0 # via factory-boy +faker==26.2.0 # via factory-boy fastjsonschema==2.20.0 # via nbformat filelock==3.15.4 # via tox, virtualenv -flake8==7.1.0 # via -r requirements-dev.in, flake8-bugbear, flake8-builtins, flake8-debugger, flake8-docstrings, flake8-eradicate, flake8-mutable, flake8-pyproject, flake8-rst-docstrings +flake8==7.1.1 # via -r requirements-dev.in, flake8-bugbear, flake8-builtins, flake8-debugger, flake8-docstrings, flake8-eradicate, flake8-mutable, flake8-pyproject, flake8-rst-docstrings flake8-bugbear==24.4.26 # via -r requirements-dev.in flake8-builtins==2.5.0 # via -r requirements-dev.in flake8-debugger==4.1.2 # via -r requirements-dev.in @@ -65,11 +63,11 @@ fonttools==4.53.1 # via matplotlib fparser==0.1.4 # via dace frozendict==2.4.4 # via gt4py (pyproject.toml) gridtools-cpp==2.3.4 # via gt4py (pyproject.toml) -hypothesis==6.105.1 # via -r requirements-dev.in, gt4py (pyproject.toml) +hypothesis==6.109.0 # via -r requirements-dev.in, gt4py (pyproject.toml) identify==2.6.0 # via pre-commit idna==3.7 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==8.0.0 # via build, jupyter-client, sphinx +importlib-metadata==8.2.0 # via build, jupyter-client, sphinx importlib-resources==6.4.0 ; python_version < "3.9" # via gt4py (pyproject.toml), jsonschema, jsonschema-specifications, matplotlib inflection==0.5.1 # via pytest-factoryboy iniconfig==2.0.0 # via pytest @@ -78,11 +76,11 @@ ipython==8.12.3 # via ipykernel isort==5.13.2 # via -r requirements-dev.in jedi==0.19.1 # via ipython jinja2==3.1.4 # via dace, gt4py (pyproject.toml), sphinx -jsonschema==4.22.0 # via nbformat +jsonschema==4.23.0 # via nbformat jsonschema-specifications==2023.12.1 # via jsonschema jupyter-client==8.6.2 # via ipykernel, nbclient jupyter-core==5.7.2 # via ipykernel, jupyter-client, nbformat -jupytext==1.16.2 # via -r requirements-dev.in +jupytext==1.16.4 # via -r requirements-dev.in kiwisolver==1.4.5 # via matplotlib lark==1.1.9 # via gt4py (pyproject.toml) mako==1.3.5 # via gt4py (pyproject.toml) @@ -94,7 +92,7 @@ mccabe==0.7.0 # via flake8 mdit-py-plugins==0.4.1 # via jupytext mdurl==0.1.2 # via markdown-it-py mpmath==1.3.0 # via sympy -mypy==1.10.1 # via -r requirements-dev.in +mypy==1.11.1 # via -r requirements-dev.in mypy-extensions==1.0.0 # via black, mypy nanobind==2.0.0 # via gt4py (pyproject.toml) nbclient==0.6.8 # via nbmake @@ -104,7 +102,7 @@ nest-asyncio==1.6.0 # via ipykernel, nbclient networkx==3.1 # via dace ninja==1.11.1.1 # via gt4py (pyproject.toml) nodeenv==1.9.1 # via pre-commit -numpy==1.24.4 # via contourpy, dace, gt4py (pyproject.toml), matplotlib, scipy, types-jack-client +numpy==1.24.4 # via contourpy, dace, gt4py (pyproject.toml), matplotlib, scipy ordered-set==4.1.0 # via deepdiff packaging==24.1 # via black, build, gt4py (pyproject.toml), ipykernel, jupytext, matplotlib, pipdeptree, pyproject-api, pytest, pytest-factoryboy, setuptools-scm, sphinx, tox parso==0.8.4 # via jedi @@ -113,7 +111,7 @@ pexpect==4.9.0 # via ipython pickleshare==0.7.5 # via ipython pillow==10.4.0 # via matplotlib pip-tools==7.4.1 # via -r requirements-dev.in -pipdeptree==2.23.0 # via -r requirements-dev.in +pipdeptree==2.23.1 # via -r requirements-dev.in pkgutil-resolve-name==1.3.10 # via jsonschema platformdirs==4.2.2 # via black, jupyter-core, tox, virtualenv pluggy==1.5.0 # via pytest, tox @@ -122,20 +120,19 @@ pre-commit==3.5.0 # via -r requirements-dev.in prompt-toolkit==3.0.36 # via ipython, questionary psutil==6.0.0 # via -r requirements-dev.in, ipykernel, pytest-xdist ptyprocess==0.7.0 # via pexpect -pure-eval==0.2.2 # via stack-data +pure-eval==0.2.3 # via stack-data pybind11==2.13.1 # via gt4py (pyproject.toml) -pycodestyle==2.12.0 # via flake8, flake8-debugger -pycparser==2.22 # via cffi +pycodestyle==2.12.1 # via flake8, flake8-debugger pydantic==2.8.2 # via bump-my-version, pydantic-settings pydantic-core==2.20.1 # via pydantic -pydantic-settings==2.3.4 # via bump-my-version +pydantic-settings==2.4.0 # via bump-my-version pydocstyle==6.3.0 # via flake8-docstrings pyflakes==3.2.0 # via flake8 pygments==2.18.0 # via -r requirements-dev.in, devtools, flake8-rst-docstrings, ipython, nbmake, rich, sphinx pyparsing==3.1.2 # via matplotlib pyproject-api==1.7.1 # via tox pyproject-hooks==1.1.0 # via build, pip-tools -pytest==8.2.2 # via -r requirements-dev.in, gt4py (pyproject.toml), nbmake, pytest-cache, pytest-cov, pytest-factoryboy, pytest-instafail, pytest-xdist +pytest==8.3.2 # via -r requirements-dev.in, gt4py (pyproject.toml), nbmake, pytest-cache, pytest-cov, pytest-factoryboy, pytest-instafail, pytest-xdist pytest-cache==1.0 # via -r requirements-dev.in pytest-cov==5.0.0 # via -r requirements-dev.in pytest-factoryboy==2.7.0 # via -r requirements-dev.in @@ -144,16 +141,16 @@ pytest-xdist==3.6.1 # via -r requirements-dev.in python-dateutil==2.9.0.post0 # via faker, jupyter-client, matplotlib python-dotenv==1.0.1 # via pydantic-settings pytz==2024.1 # via babel -pyyaml==6.0.1 # via dace, jupytext, pre-commit -pyzmq==26.0.3 # via ipykernel, jupyter-client +pyyaml==6.0.2 # via dace, jupytext, pre-commit +pyzmq==26.1.0 # via ipykernel, jupyter-client questionary==2.0.1 # via bump-my-version referencing==0.35.1 # via jsonschema, jsonschema-specifications requests==2.32.3 # via sphinx restructuredtext-lint==1.4.0 # via flake8-rst-docstrings rich==13.7.1 # via bump-my-version, rich-click rich-click==1.8.3 # via bump-my-version -rpds-py==0.18.1 # via jsonschema, referencing -ruff==0.5.1 # via -r requirements-dev.in +rpds-py==0.20.0 # via jsonschema, referencing +ruff==0.5.6 # via -r requirements-dev.in scipy==1.10.1 # via gt4py (pyproject.toml) setuptools-scm==8.1.0 # via fparser six==1.16.0 # via asttokens, astunparse, python-dateutil @@ -172,111 +169,22 @@ stack-data==0.6.3 # via ipython sympy==1.12.1 # via dace, gt4py (pyproject.toml) tabulate==0.9.0 # via gt4py (pyproject.toml) tomli==2.0.1 ; python_version < "3.11" # via -r requirements-dev.in, black, build, coverage, flake8-pyproject, jupytext, mypy, pip-tools, pyproject-api, pytest, setuptools-scm, tox -tomlkit==0.12.5 # via bump-my-version +tomlkit==0.13.0 # via bump-my-version toolz==0.12.1 # via cytoolz tornado==6.4.1 # via ipykernel, jupyter-client -tox==4.16.0 # via -r requirements-dev.in +tox==4.17.0 # via -r requirements-dev.in traitlets==5.14.3 # via comm, ipykernel, ipython, jupyter-client, jupyter-core, matplotlib-inline, nbclient, nbformat -types-aiofiles==24.1.0.20240626 # via types-all -types-all==1.0.0 # via -r requirements-dev.in -types-annoy==1.17.8.4 # via types-all -types-atomicwrites==1.4.5.1 # via types-all -types-backports==0.1.3 # via types-all -types-backports-abc==0.5.2 # via types-all -types-bleach==6.1.0.20240331 # via types-all -types-boto==2.49.18.20240205 # via types-all -types-cachetools==5.3.0.7 # via types-all -types-certifi==2021.10.8.3 # via types-all -types-cffi==1.16.0.20240331 # via types-jack-client, types-pyopenssl -types-characteristic==14.3.7 # via types-all -types-chardet==5.0.4.6 # via types-all -types-click==7.1.8 # via types-all, types-flask -types-click-spinner==0.1.13.20240311 # via types-all -types-colorama==0.4.15.20240311 # via types-all -types-contextvars==2.4.7.3 # via types-all -types-croniter==2.0.0.20240423 # via types-all -types-cryptography==3.3.23.2 # via types-all, types-openssl-python, types-pyjwt -types-dataclasses==0.6.6 # via types-all -types-dateparser==1.2.0.20240420 # via types-all -types-datetimerange==2.0.0.6 # via types-all -types-decorator==5.1.8.20240310 # via types-all -types-deprecated==1.2.9.20240311 # via types-all -types-docopt==0.6.11.4 # via types-all -types-docutils==0.21.0.20240708 # via types-all -types-emoji==2.1.0.3 # via types-all -types-enum34==1.1.8 # via types-all -types-fb303==1.0.0 # via types-all, types-scribe -types-filelock==3.2.7 # via types-all -types-first==2.0.5.2 # via types-all -types-flask==1.1.6 # via types-all -types-freezegun==1.1.10 # via types-all -types-frozendict==2.0.9 # via types-all -types-futures==3.3.8 # via types-all -types-geoip2==3.0.0 # via types-all -types-html5lib==1.1.11.20240228 # via types-bleach -types-ipaddress==1.0.8 # via types-all, types-maxminddb -types-itsdangerous==1.1.6 # via types-all -types-jack-client==0.5.10.20240425 # via types-all -types-jinja2==2.11.9 # via types-all, types-flask -types-kazoo==0.1.3 # via types-all -types-markdown==3.6.0.20240316 # via types-all -types-markupsafe==1.1.10 # via types-all, types-jinja2 -types-maxminddb==1.5.0 # via types-all, types-geoip2 -types-mock==5.1.0.20240425 # via types-all -types-mypy-extensions==1.0.0.20240311 # via types-all -types-nmap==0.1.6 # via types-all -types-openssl-python==0.1.3 # via types-all -types-orjson==3.6.2 # via types-all -types-paramiko==3.4.0.20240423 # via types-all, types-pysftp -types-pathlib2==2.3.0 # via types-all -types-pillow==10.2.0.20240520 # via types-all -types-pkg-resources==0.1.3 # via types-all -types-polib==1.2.0.20240327 # via types-all -types-protobuf==5.27.0.20240626 # via types-all -types-pyaudio==0.2.16.20240516 # via types-all -types-pycurl==7.45.3.20240421 # via types-all -types-pyfarmhash==0.3.1.20240311 # via types-all -types-pyjwt==1.7.1 # via types-all -types-pymssql==2.1.0 # via types-all -types-pymysql==1.1.0.20240524 # via types-all -types-pyopenssl==24.1.0.20240425 # via types-redis -types-pyrfc3339==1.1.1.5 # via types-all -types-pysftp==0.2.17.20240106 # via types-all -types-python-dateutil==2.9.0.20240316 # via types-all, types-datetimerange -types-python-gflags==3.1.7.3 # via types-all -types-python-slugify==8.0.2.20240310 # via types-all -types-pytz==2024.1.0.20240417 # via types-all, types-tzlocal -types-pyvmomi==8.0.0.6 # via types-all -types-pyyaml==6.0.12.20240311 # via types-all -types-redis==4.6.0.20240425 # via types-all -types-requests==2.32.0.20240622 # via types-all -types-retry==0.9.9.4 # via types-all -types-routes==2.5.0 # via types-all -types-scribe==2.0.0 # via types-all -types-setuptools==70.2.0.20240704 # via types-cffi -types-simplejson==3.19.0.20240310 # via types-all -types-singledispatch==4.1.0.0 # via types-all -types-six==1.16.21.20240513 # via types-all -types-tabulate==0.9.0.20240106 # via types-all -types-termcolor==1.1.6.2 # via types-all -types-toml==0.10.8.20240310 # via types-all -types-tornado==5.1.1 # via types-all -types-typed-ast==1.5.8.7 # via types-all -types-tzlocal==5.1.0.1 # via types-all -types-ujson==5.10.0.20240515 # via types-all -types-waitress==3.0.0.20240423 # via types-all -types-werkzeug==1.0.9 # via types-all, types-flask -types-xxhash==3.0.5.2 # via types-all +types-tabulate==0.9.0.20240106 # via -r requirements-dev.in typing-extensions==4.12.2 # via annotated-types, black, gt4py (pyproject.toml), ipython, mypy, pydantic, pydantic-core, pytest-factoryboy, rich, rich-click, setuptools-scm -urllib3==2.2.2 # via requests, types-requests +urllib3==2.2.2 # via requests virtualenv==20.26.3 # via pre-commit, tox -wcmatch==8.5.2 # via bump-my-version +wcmatch==9.0 # via bump-my-version wcwidth==0.2.13 # via prompt-toolkit websockets==12.0 # via dace -wheel==0.43.0 # via astunparse, pip-tools +wheel==0.44.0 # via astunparse, pip-tools xxhash==3.0.0 # via gt4py (pyproject.toml) zipp==3.19.2 # via importlib-metadata, importlib-resources # The following packages are considered to be unsafe in a requirements file: -pip==24.1.2 # via pip-tools, pipdeptree -setuptools==70.2.0 # via gt4py (pyproject.toml), pip-tools, setuptools-scm +pip==24.2 # via pip-tools, pipdeptree +setuptools==72.1.0 # via gt4py (pyproject.toml), pip-tools, setuptools-scm diff --git a/min-extra-requirements-test.txt b/min-extra-requirements-test.txt index d321863bc5..44535bb890 100644 --- a/min-extra-requirements-test.txt +++ b/min-extra-requirements-test.txt @@ -113,7 +113,7 @@ sympy==1.9 tabulate==0.8.10 tomli==2.0.1; python_version < "3.11" tox==3.2.0 -types-all==1.0.0 +types-tabulate==0.8.10 typing-extensions==4.10.0 xxhash==1.4.4 ##[[[end]]] diff --git a/min-requirements-test.txt b/min-requirements-test.txt index 537bea6d4c..17b07db9c9 100644 --- a/min-requirements-test.txt +++ b/min-requirements-test.txt @@ -106,7 +106,7 @@ sphinx_rtd_theme==1.0 tabulate==0.8.10 tomli==2.0.1; python_version < "3.11" tox==3.2.0 -types-all==1.0.0 +types-tabulate==0.8.10 typing-extensions==4.10.0 xxhash==1.4.4 ##[[[end]]] diff --git a/pyproject.toml b/pyproject.toml index c1c483a74e..10b2ff77b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,7 @@ all-cuda12 = ['gt4py[cuda12,dace,formatting,jax-cuda12,performance,testing]'] # Other extras cuda11 = ['cupy-cuda11x>=12.0'] cuda12 = ['cupy-cuda12x>=12.0'] -dace = ['dace>=0.16.1', 'sympy>=1.9'] +dace = ['dace>=0.16.1', 'sympy>=1.9,<1.13'] # see https://github.com/spcl/dace/pull/1620 formatting = ['clang-format>=9.0'] gpu = ['cupy>=12.0'] jax-cpu = ['jax[cpu]>=0.4.18; python_version>="3.10"'] diff --git a/requirements-dev.in b/requirements-dev.in index ac66ce3ca6..a1530ee731 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -41,4 +41,4 @@ sphinx>=4.4 sphinx_rtd_theme>=1.0 tomli>=2.0.1;python_version<'3.11' tox>=3.2.0 -types-all>=1.0.0 +types-tabulate>=0.8.10 diff --git a/requirements-dev.txt b/requirements-dev.txt index ab079f5eac..de42f3e24e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -9,35 +9,33 @@ alabaster==0.7.13 # via -c constraints.txt, sphinx annotated-types==0.7.0 # via -c constraints.txt, pydantic asttokens==2.4.1 # via -c constraints.txt, devtools, stack-data astunparse==1.6.3 ; python_version < "3.9" # via -c constraints.txt, dace, gt4py (pyproject.toml) -attrs==23.2.0 # via -c constraints.txt, flake8-bugbear, flake8-eradicate, gt4py (pyproject.toml), hypothesis, jsonschema, referencing +attrs==24.2.0 # via -c constraints.txt, flake8-bugbear, flake8-eradicate, gt4py (pyproject.toml), hypothesis, jsonschema, referencing babel==2.15.0 # via -c constraints.txt, sphinx backcall==0.2.0 # via -c constraints.txt, ipython -black==24.4.2 # via -c constraints.txt, gt4py (pyproject.toml) +black==24.8.0 # via -c constraints.txt, gt4py (pyproject.toml) boltons==24.0.0 # via -c constraints.txt, gt4py (pyproject.toml) -bracex==2.4 # via -c constraints.txt, wcmatch +bracex==2.5 # via -c constraints.txt, wcmatch build==1.2.1 # via -c constraints.txt, pip-tools -bump-my-version==0.24.2 # via -c constraints.txt, -r requirements-dev.in +bump-my-version==0.25.0 # via -c constraints.txt, -r requirements-dev.in cached-property==1.5.2 # via -c constraints.txt, gt4py (pyproject.toml) -cachetools==5.3.3 # via -c constraints.txt, tox +cachetools==5.4.0 # via -c constraints.txt, tox certifi==2024.7.4 # via -c constraints.txt, requests -cffi==1.16.0 # via -c constraints.txt, cryptography cfgv==3.4.0 # via -c constraints.txt, pre-commit chardet==5.2.0 # via -c constraints.txt, tox charset-normalizer==3.3.2 # via -c constraints.txt, requests clang-format==18.1.8 # via -c constraints.txt, -r requirements-dev.in, gt4py (pyproject.toml) click==8.1.7 # via -c constraints.txt, black, bump-my-version, gt4py (pyproject.toml), pip-tools, rich-click -cmake==3.30.0 # via -c constraints.txt, gt4py (pyproject.toml) +cmake==3.30.2 # via -c constraints.txt, gt4py (pyproject.toml) cogapp==3.4.1 # via -c constraints.txt, -r requirements-dev.in colorama==0.4.6 # via -c constraints.txt, tox comm==0.2.2 # via -c constraints.txt, ipykernel contourpy==1.1.1 # via -c constraints.txt, matplotlib -coverage[toml]==7.5.4 # via -c constraints.txt, -r requirements-dev.in, pytest-cov -cryptography==42.0.8 # via -c constraints.txt, types-paramiko, types-pyopenssl, types-redis +coverage[toml]==7.6.1 # via -c constraints.txt, -r requirements-dev.in, pytest-cov cycler==0.12.1 # via -c constraints.txt, matplotlib cytoolz==0.12.3 # via -c constraints.txt, gt4py (pyproject.toml) dace==0.16.1 # via -c constraints.txt, gt4py (pyproject.toml) darglint==1.8.1 # via -c constraints.txt, -r requirements-dev.in -debugpy==1.8.2 # via -c constraints.txt, ipykernel +debugpy==1.8.5 # via -c constraints.txt, ipykernel decorator==5.1.1 # via -c constraints.txt, ipython deepdiff==7.0.1 # via -c constraints.txt, gt4py (pyproject.toml) devtools==0.12.2 # via -c constraints.txt, gt4py (pyproject.toml) @@ -45,14 +43,14 @@ dill==0.3.8 # via -c constraints.txt, dace distlib==0.3.8 # via -c constraints.txt, virtualenv docutils==0.20.1 # via -c constraints.txt, restructuredtext-lint, sphinx, sphinx-rtd-theme eradicate==2.3.0 # via -c constraints.txt, flake8-eradicate -exceptiongroup==1.2.1 # via -c constraints.txt, hypothesis, pytest +exceptiongroup==1.2.2 # via -c constraints.txt, hypothesis, pytest execnet==2.1.1 # via -c constraints.txt, pytest-cache, pytest-xdist executing==2.0.1 # via -c constraints.txt, devtools, stack-data factory-boy==3.3.0 # via -c constraints.txt, gt4py (pyproject.toml), pytest-factoryboy -faker==26.0.0 # via -c constraints.txt, factory-boy +faker==26.2.0 # via -c constraints.txt, factory-boy fastjsonschema==2.20.0 # via -c constraints.txt, nbformat filelock==3.15.4 # via -c constraints.txt, tox, virtualenv -flake8==7.1.0 # via -c constraints.txt, -r requirements-dev.in, flake8-bugbear, flake8-builtins, flake8-debugger, flake8-docstrings, flake8-eradicate, flake8-mutable, flake8-pyproject, flake8-rst-docstrings +flake8==7.1.1 # via -c constraints.txt, -r requirements-dev.in, flake8-bugbear, flake8-builtins, flake8-debugger, flake8-docstrings, flake8-eradicate, flake8-mutable, flake8-pyproject, flake8-rst-docstrings flake8-bugbear==24.4.26 # via -c constraints.txt, -r requirements-dev.in flake8-builtins==2.5.0 # via -c constraints.txt, -r requirements-dev.in flake8-debugger==4.1.2 # via -c constraints.txt, -r requirements-dev.in @@ -65,11 +63,11 @@ fonttools==4.53.1 # via -c constraints.txt, matplotlib fparser==0.1.4 # via -c constraints.txt, dace frozendict==2.4.4 # via -c constraints.txt, gt4py (pyproject.toml) gridtools-cpp==2.3.4 # via -c constraints.txt, gt4py (pyproject.toml) -hypothesis==6.105.1 # via -c constraints.txt, -r requirements-dev.in, gt4py (pyproject.toml) +hypothesis==6.109.0 # via -c constraints.txt, -r requirements-dev.in, gt4py (pyproject.toml) identify==2.6.0 # via -c constraints.txt, pre-commit idna==3.7 # via -c constraints.txt, requests imagesize==1.4.1 # via -c constraints.txt, sphinx -importlib-metadata==8.0.0 # via -c constraints.txt, build, jupyter-client, sphinx +importlib-metadata==8.2.0 # via -c constraints.txt, build, jupyter-client, sphinx importlib-resources==6.4.0 ; python_version < "3.9" # via -c constraints.txt, gt4py (pyproject.toml), jsonschema, jsonschema-specifications, matplotlib inflection==0.5.1 # via -c constraints.txt, pytest-factoryboy iniconfig==2.0.0 # via -c constraints.txt, pytest @@ -78,11 +76,11 @@ ipython==8.12.3 # via -c constraints.txt, ipykernel isort==5.13.2 # via -c constraints.txt, -r requirements-dev.in jedi==0.19.1 # via -c constraints.txt, ipython jinja2==3.1.4 # via -c constraints.txt, dace, gt4py (pyproject.toml), sphinx -jsonschema==4.22.0 # via -c constraints.txt, nbformat +jsonschema==4.23.0 # via -c constraints.txt, nbformat jsonschema-specifications==2023.12.1 # via -c constraints.txt, jsonschema jupyter-client==8.6.2 # via -c constraints.txt, ipykernel, nbclient jupyter-core==5.7.2 # via -c constraints.txt, ipykernel, jupyter-client, nbformat -jupytext==1.16.2 # via -c constraints.txt, -r requirements-dev.in +jupytext==1.16.4 # via -c constraints.txt, -r requirements-dev.in kiwisolver==1.4.5 # via -c constraints.txt, matplotlib lark==1.1.9 # via -c constraints.txt, gt4py (pyproject.toml) mako==1.3.5 # via -c constraints.txt, gt4py (pyproject.toml) @@ -94,7 +92,7 @@ mccabe==0.7.0 # via -c constraints.txt, flake8 mdit-py-plugins==0.4.1 # via -c constraints.txt, jupytext mdurl==0.1.2 # via -c constraints.txt, markdown-it-py mpmath==1.3.0 # via -c constraints.txt, sympy -mypy==1.10.1 # via -c constraints.txt, -r requirements-dev.in +mypy==1.11.1 # via -c constraints.txt, -r requirements-dev.in mypy-extensions==1.0.0 # via -c constraints.txt, black, mypy nanobind==2.0.0 # via -c constraints.txt, gt4py (pyproject.toml) nbclient==0.6.8 # via -c constraints.txt, nbmake @@ -104,7 +102,7 @@ nest-asyncio==1.6.0 # via -c constraints.txt, ipykernel, nbclient networkx==3.1 # via -c constraints.txt, dace ninja==1.11.1.1 # via -c constraints.txt, gt4py (pyproject.toml) nodeenv==1.9.1 # via -c constraints.txt, pre-commit -numpy==1.24.4 # via -c constraints.txt, contourpy, dace, gt4py (pyproject.toml), matplotlib, types-jack-client +numpy==1.24.4 # via -c constraints.txt, contourpy, dace, gt4py (pyproject.toml), matplotlib ordered-set==4.1.0 # via -c constraints.txt, deepdiff packaging==24.1 # via -c constraints.txt, black, build, gt4py (pyproject.toml), ipykernel, jupytext, matplotlib, pipdeptree, pyproject-api, pytest, pytest-factoryboy, setuptools-scm, sphinx, tox parso==0.8.4 # via -c constraints.txt, jedi @@ -113,7 +111,7 @@ pexpect==4.9.0 # via -c constraints.txt, ipython pickleshare==0.7.5 # via -c constraints.txt, ipython pillow==10.4.0 # via -c constraints.txt, matplotlib pip-tools==7.4.1 # via -c constraints.txt, -r requirements-dev.in -pipdeptree==2.23.0 # via -c constraints.txt, -r requirements-dev.in +pipdeptree==2.23.1 # via -c constraints.txt, -r requirements-dev.in pkgutil-resolve-name==1.3.10 # via -c constraints.txt, jsonschema platformdirs==4.2.2 # via -c constraints.txt, black, jupyter-core, tox, virtualenv pluggy==1.5.0 # via -c constraints.txt, pytest, tox @@ -122,20 +120,19 @@ pre-commit==3.5.0 # via -c constraints.txt, -r requirements-dev.in prompt-toolkit==3.0.36 # via -c constraints.txt, ipython, questionary psutil==6.0.0 # via -c constraints.txt, -r requirements-dev.in, ipykernel, pytest-xdist ptyprocess==0.7.0 # via -c constraints.txt, pexpect -pure-eval==0.2.2 # via -c constraints.txt, stack-data +pure-eval==0.2.3 # via -c constraints.txt, stack-data pybind11==2.13.1 # via -c constraints.txt, gt4py (pyproject.toml) -pycodestyle==2.12.0 # via -c constraints.txt, flake8, flake8-debugger -pycparser==2.22 # via -c constraints.txt, cffi +pycodestyle==2.12.1 # via -c constraints.txt, flake8, flake8-debugger pydantic==2.8.2 # via -c constraints.txt, bump-my-version, pydantic-settings pydantic-core==2.20.1 # via -c constraints.txt, pydantic -pydantic-settings==2.3.4 # via -c constraints.txt, bump-my-version +pydantic-settings==2.4.0 # via -c constraints.txt, bump-my-version pydocstyle==6.3.0 # via -c constraints.txt, flake8-docstrings pyflakes==3.2.0 # via -c constraints.txt, flake8 pygments==2.18.0 # via -c constraints.txt, -r requirements-dev.in, devtools, flake8-rst-docstrings, ipython, nbmake, rich, sphinx pyparsing==3.1.2 # via -c constraints.txt, matplotlib pyproject-api==1.7.1 # via -c constraints.txt, tox pyproject-hooks==1.1.0 # via -c constraints.txt, build, pip-tools -pytest==8.2.2 # via -c constraints.txt, -r requirements-dev.in, gt4py (pyproject.toml), nbmake, pytest-cache, pytest-cov, pytest-factoryboy, pytest-instafail, pytest-xdist +pytest==8.3.2 # via -c constraints.txt, -r requirements-dev.in, gt4py (pyproject.toml), nbmake, pytest-cache, pytest-cov, pytest-factoryboy, pytest-instafail, pytest-xdist pytest-cache==1.0 # via -c constraints.txt, -r requirements-dev.in pytest-cov==5.0.0 # via -c constraints.txt, -r requirements-dev.in pytest-factoryboy==2.7.0 # via -c constraints.txt, -r requirements-dev.in @@ -144,16 +141,16 @@ pytest-xdist[psutil]==3.6.1 # via -c constraints.txt, -r requirements-dev.in python-dateutil==2.9.0.post0 # via -c constraints.txt, faker, jupyter-client, matplotlib python-dotenv==1.0.1 # via -c constraints.txt, pydantic-settings pytz==2024.1 # via -c constraints.txt, babel -pyyaml==6.0.1 # via -c constraints.txt, dace, jupytext, pre-commit -pyzmq==26.0.3 # via -c constraints.txt, ipykernel, jupyter-client +pyyaml==6.0.2 # via -c constraints.txt, dace, jupytext, pre-commit +pyzmq==26.1.0 # via -c constraints.txt, ipykernel, jupyter-client questionary==2.0.1 # via -c constraints.txt, bump-my-version referencing==0.35.1 # via -c constraints.txt, jsonschema, jsonschema-specifications requests==2.32.3 # via -c constraints.txt, sphinx restructuredtext-lint==1.4.0 # via -c constraints.txt, flake8-rst-docstrings rich==13.7.1 # via -c constraints.txt, bump-my-version, rich-click rich-click==1.8.3 # via -c constraints.txt, bump-my-version -rpds-py==0.18.1 # via -c constraints.txt, jsonschema, referencing -ruff==0.5.1 # via -c constraints.txt, -r requirements-dev.in +rpds-py==0.20.0 # via -c constraints.txt, jsonschema, referencing +ruff==0.5.6 # via -c constraints.txt, -r requirements-dev.in setuptools-scm==8.1.0 # via -c constraints.txt, fparser six==1.16.0 # via -c constraints.txt, asttokens, astunparse, python-dateutil snowballstemmer==2.2.0 # via -c constraints.txt, pydocstyle, sphinx @@ -171,111 +168,22 @@ stack-data==0.6.3 # via -c constraints.txt, ipython sympy==1.12.1 # via -c constraints.txt, dace, gt4py (pyproject.toml) tabulate==0.9.0 # via -c constraints.txt, gt4py (pyproject.toml) tomli==2.0.1 ; python_version < "3.11" # via -c constraints.txt, -r requirements-dev.in, black, build, coverage, flake8-pyproject, jupytext, mypy, pip-tools, pyproject-api, pytest, setuptools-scm, tox -tomlkit==0.12.5 # via -c constraints.txt, bump-my-version +tomlkit==0.13.0 # via -c constraints.txt, bump-my-version toolz==0.12.1 # via -c constraints.txt, cytoolz tornado==6.4.1 # via -c constraints.txt, ipykernel, jupyter-client -tox==4.16.0 # via -c constraints.txt, -r requirements-dev.in +tox==4.17.0 # via -c constraints.txt, -r requirements-dev.in traitlets==5.14.3 # via -c constraints.txt, comm, ipykernel, ipython, jupyter-client, jupyter-core, matplotlib-inline, nbclient, nbformat -types-aiofiles==24.1.0.20240626 # via -c constraints.txt, types-all -types-all==1.0.0 # via -c constraints.txt, -r requirements-dev.in -types-annoy==1.17.8.4 # via -c constraints.txt, types-all -types-atomicwrites==1.4.5.1 # via -c constraints.txt, types-all -types-backports==0.1.3 # via -c constraints.txt, types-all -types-backports-abc==0.5.2 # via -c constraints.txt, types-all -types-bleach==6.1.0.20240331 # via -c constraints.txt, types-all -types-boto==2.49.18.20240205 # via -c constraints.txt, types-all -types-cachetools==5.3.0.7 # via -c constraints.txt, types-all -types-certifi==2021.10.8.3 # via -c constraints.txt, types-all -types-cffi==1.16.0.20240331 # via -c constraints.txt, types-jack-client, types-pyopenssl -types-characteristic==14.3.7 # via -c constraints.txt, types-all -types-chardet==5.0.4.6 # via -c constraints.txt, types-all -types-click==7.1.8 # via -c constraints.txt, types-all, types-flask -types-click-spinner==0.1.13.20240311 # via -c constraints.txt, types-all -types-colorama==0.4.15.20240311 # via -c constraints.txt, types-all -types-contextvars==2.4.7.3 # via -c constraints.txt, types-all -types-croniter==2.0.0.20240423 # via -c constraints.txt, types-all -types-cryptography==3.3.23.2 # via -c constraints.txt, types-all, types-openssl-python, types-pyjwt -types-dataclasses==0.6.6 # via -c constraints.txt, types-all -types-dateparser==1.2.0.20240420 # via -c constraints.txt, types-all -types-datetimerange==2.0.0.6 # via -c constraints.txt, types-all -types-decorator==5.1.8.20240310 # via -c constraints.txt, types-all -types-deprecated==1.2.9.20240311 # via -c constraints.txt, types-all -types-docopt==0.6.11.4 # via -c constraints.txt, types-all -types-docutils==0.21.0.20240708 # via -c constraints.txt, types-all -types-emoji==2.1.0.3 # via -c constraints.txt, types-all -types-enum34==1.1.8 # via -c constraints.txt, types-all -types-fb303==1.0.0 # via -c constraints.txt, types-all, types-scribe -types-filelock==3.2.7 # via -c constraints.txt, types-all -types-first==2.0.5.2 # via -c constraints.txt, types-all -types-flask==1.1.6 # via -c constraints.txt, types-all -types-freezegun==1.1.10 # via -c constraints.txt, types-all -types-frozendict==2.0.9 # via -c constraints.txt, types-all -types-futures==3.3.8 # via -c constraints.txt, types-all -types-geoip2==3.0.0 # via -c constraints.txt, types-all -types-html5lib==1.1.11.20240228 # via -c constraints.txt, types-bleach -types-ipaddress==1.0.8 # via -c constraints.txt, types-all, types-maxminddb -types-itsdangerous==1.1.6 # via -c constraints.txt, types-all -types-jack-client==0.5.10.20240425 # via -c constraints.txt, types-all -types-jinja2==2.11.9 # via -c constraints.txt, types-all, types-flask -types-kazoo==0.1.3 # via -c constraints.txt, types-all -types-markdown==3.6.0.20240316 # via -c constraints.txt, types-all -types-markupsafe==1.1.10 # via -c constraints.txt, types-all, types-jinja2 -types-maxminddb==1.5.0 # via -c constraints.txt, types-all, types-geoip2 -types-mock==5.1.0.20240425 # via -c constraints.txt, types-all -types-mypy-extensions==1.0.0.20240311 # via -c constraints.txt, types-all -types-nmap==0.1.6 # via -c constraints.txt, types-all -types-openssl-python==0.1.3 # via -c constraints.txt, types-all -types-orjson==3.6.2 # via -c constraints.txt, types-all -types-paramiko==3.4.0.20240423 # via -c constraints.txt, types-all, types-pysftp -types-pathlib2==2.3.0 # via -c constraints.txt, types-all -types-pillow==10.2.0.20240520 # via -c constraints.txt, types-all -types-pkg-resources==0.1.3 # via -c constraints.txt, types-all -types-polib==1.2.0.20240327 # via -c constraints.txt, types-all -types-protobuf==5.27.0.20240626 # via -c constraints.txt, types-all -types-pyaudio==0.2.16.20240516 # via -c constraints.txt, types-all -types-pycurl==7.45.3.20240421 # via -c constraints.txt, types-all -types-pyfarmhash==0.3.1.20240311 # via -c constraints.txt, types-all -types-pyjwt==1.7.1 # via -c constraints.txt, types-all -types-pymssql==2.1.0 # via -c constraints.txt, types-all -types-pymysql==1.1.0.20240524 # via -c constraints.txt, types-all -types-pyopenssl==24.1.0.20240425 # via -c constraints.txt, types-redis -types-pyrfc3339==1.1.1.5 # via -c constraints.txt, types-all -types-pysftp==0.2.17.20240106 # via -c constraints.txt, types-all -types-python-dateutil==2.9.0.20240316 # via -c constraints.txt, types-all, types-datetimerange -types-python-gflags==3.1.7.3 # via -c constraints.txt, types-all -types-python-slugify==8.0.2.20240310 # via -c constraints.txt, types-all -types-pytz==2024.1.0.20240417 # via -c constraints.txt, types-all, types-tzlocal -types-pyvmomi==8.0.0.6 # via -c constraints.txt, types-all -types-pyyaml==6.0.12.20240311 # via -c constraints.txt, types-all -types-redis==4.6.0.20240425 # via -c constraints.txt, types-all -types-requests==2.32.0.20240622 # via -c constraints.txt, types-all -types-retry==0.9.9.4 # via -c constraints.txt, types-all -types-routes==2.5.0 # via -c constraints.txt, types-all -types-scribe==2.0.0 # via -c constraints.txt, types-all -types-setuptools==70.2.0.20240704 # via -c constraints.txt, types-cffi -types-simplejson==3.19.0.20240310 # via -c constraints.txt, types-all -types-singledispatch==4.1.0.0 # via -c constraints.txt, types-all -types-six==1.16.21.20240513 # via -c constraints.txt, types-all -types-tabulate==0.9.0.20240106 # via -c constraints.txt, types-all -types-termcolor==1.1.6.2 # via -c constraints.txt, types-all -types-toml==0.10.8.20240310 # via -c constraints.txt, types-all -types-tornado==5.1.1 # via -c constraints.txt, types-all -types-typed-ast==1.5.8.7 # via -c constraints.txt, types-all -types-tzlocal==5.1.0.1 # via -c constraints.txt, types-all -types-ujson==5.10.0.20240515 # via -c constraints.txt, types-all -types-waitress==3.0.0.20240423 # via -c constraints.txt, types-all -types-werkzeug==1.0.9 # via -c constraints.txt, types-all, types-flask -types-xxhash==3.0.5.2 # via -c constraints.txt, types-all +types-tabulate==0.9.0.20240106 # via -c constraints.txt, -r requirements-dev.in typing-extensions==4.12.2 # via -c constraints.txt, annotated-types, black, gt4py (pyproject.toml), ipython, mypy, pydantic, pydantic-core, pytest-factoryboy, rich, rich-click, setuptools-scm -urllib3==2.2.2 # via -c constraints.txt, requests, types-requests +urllib3==2.2.2 # via -c constraints.txt, requests virtualenv==20.26.3 # via -c constraints.txt, pre-commit, tox -wcmatch==8.5.2 # via -c constraints.txt, bump-my-version +wcmatch==9.0 # via -c constraints.txt, bump-my-version wcwidth==0.2.13 # via -c constraints.txt, prompt-toolkit websockets==12.0 # via -c constraints.txt, dace -wheel==0.43.0 # via -c constraints.txt, astunparse, pip-tools +wheel==0.44.0 # via -c constraints.txt, astunparse, pip-tools xxhash==3.0.0 # via -c constraints.txt, gt4py (pyproject.toml) zipp==3.19.2 # via -c constraints.txt, importlib-metadata, importlib-resources # The following packages are considered to be unsafe in a requirements file: -pip==24.1.2 # via -c constraints.txt, pip-tools, pipdeptree -setuptools==70.2.0 # via -c constraints.txt, gt4py (pyproject.toml), pip-tools, setuptools-scm +pip==24.2 # via -c constraints.txt, pip-tools, pipdeptree +setuptools==72.1.0 # via -c constraints.txt, gt4py (pyproject.toml), pip-tools, setuptools-scm diff --git a/src/gt4py/_core/definitions.py b/src/gt4py/_core/definitions.py index 1cd58b78c8..ff8637bfe3 100644 --- a/src/gt4py/_core/definitions.py +++ b/src/gt4py/_core/definitions.py @@ -167,11 +167,9 @@ class DTypeKind(eve.StrEnum): @overload -def dtype_kind(sc_type: Type[BoolT]) -> Literal[DTypeKind.BOOL]: ... - - -@overload -def dtype_kind(sc_type: Type[IntT]) -> Literal[DTypeKind.INT]: ... +def dtype_kind( + sc_type: Type[IntT] | Type[BoolT], # mypy doesn't distinguish IntT and BoolT +) -> Literal[DTypeKind.INT, DTypeKind.BOOL]: ... @overload diff --git a/src/gt4py/cartesian/gtc/passes/oir_pipeline.py b/src/gt4py/cartesian/gtc/passes/oir_pipeline.py index 91bc0a2129..3056e5a140 100644 --- a/src/gt4py/cartesian/gtc/passes/oir_pipeline.py +++ b/src/gt4py/cartesian/gtc/passes/oir_pipeline.py @@ -106,5 +106,5 @@ def run(self, oir: oir.Stencil) -> oir.Stencil: if isinstance(step, type) and issubclass(step, NodeVisitor): oir = step().visit(oir) else: - oir = step(oir) + oir = step(oir) # type: ignore[call-arg, assignment] return oir diff --git a/src/gt4py/eve/datamodels/core.py b/src/gt4py/eve/datamodels/core.py index 5bd9c98f8c..48d48cd19f 100644 --- a/src/gt4py/eve/datamodels/core.py +++ b/src/gt4py/eve/datamodels/core.py @@ -261,7 +261,7 @@ def datamodel( cls: Literal[None] = None, /, *, - repr: bool = _REPR_DEFAULT, # noqa: A002 [builtin-argument-shadowing] + repr: bool = _REPR_DEFAULT, eq: bool = _EQ_DEFAULT, order: bool = _ORDER_DEFAULT, unsafe_hash: bool = _UNSAFE_HASH_DEFAULT, @@ -280,7 +280,7 @@ def datamodel( # redefinion of unused symbol cls: Type[_T], /, *, - repr: bool = _REPR_DEFAULT, # noqa: A002 [builtin-argument-shadowing] + repr: bool = _REPR_DEFAULT, eq: bool = _EQ_DEFAULT, order: bool = _ORDER_DEFAULT, unsafe_hash: bool = _UNSAFE_HASH_DEFAULT, @@ -373,7 +373,7 @@ def datamodel( # redefinion of unused symbol } if cls is None: # called as: @datamodel() - return functools.partial(_make_datamodel, **datamodel_options) + return functools.partial(_make_datamodel, **datamodel_options) # type: ignore[arg-type, return-value] else: # called as: @datamodel return _make_datamodel( cls, diff --git a/src/gt4py/eve/utils.py b/src/gt4py/eve/utils.py index 2c2d4b6c58..fd91192933 100644 --- a/src/gt4py/eve/utils.py +++ b/src/gt4py/eve/utils.py @@ -433,12 +433,14 @@ def content_hash(*args: Any, hash_algorithm: str | xtyping.HashlibAlgorithm | No """ if hash_algorithm is None: - hash_algorithm = xxhash.xxh64() + hasher = xxhash.xxh64() elif isinstance(hash_algorithm, str): - hash_algorithm = hashlib.new(hash_algorithm) + hasher = hashlib.new(hash_algorithm) + else: + hasher = hash_algorithm - hash_algorithm.update(pickle.dumps(args)) - result = hash_algorithm.hexdigest() + hasher.update(pickle.dumps(args)) + result = hasher.hexdigest() assert isinstance(result, str) return result diff --git a/src/gt4py/next/embedded/operators.py b/src/gt4py/next/embedded/operators.py index 15611c225f..13a0db100e 100644 --- a/src/gt4py/next/embedded/operators.py +++ b/src/gt4py/next/embedded/operators.py @@ -44,7 +44,7 @@ class ScanOperator(EmbeddedOperator[core_defs.ScalarT | tuple[core_defs.ScalarT def __call__( # type: ignore[override] self, *args: common.Field | core_defs.Scalar, - **kwargs: common.Field | core_defs.Scalar, # type: ignore[override] + **kwargs: common.Field | core_defs.Scalar, ) -> ( common.Field[Any, core_defs.ScalarT] | tuple[common.Field[Any, core_defs.ScalarT] | tuple, ...] diff --git a/src/gt4py/next/ffront/ast_passes/fix_missing_locations.py b/src/gt4py/next/ffront/ast_passes/fix_missing_locations.py index eb567702dc..24c1717de1 100644 --- a/src/gt4py/next/ffront/ast_passes/fix_missing_locations.py +++ b/src/gt4py/next/ffront/ast_passes/fix_missing_locations.py @@ -42,15 +42,15 @@ def generic_visit(self, node: ast.AST) -> ast.AST: node = copy.copy(node) parent_node = self._parent_nodes[-1] - node.lineno = parent_node.lineno - node.col_offset = parent_node.col_offset + node.lineno = parent_node.lineno # type: ignore[attr-defined] # we are adding the attribute which breaks type checking + node.col_offset = parent_node.col_offset # type: ignore[attr-defined] # the end positions are optional according to # https://docs.python.org/3/library/ast.html#ast.AST.end_col_offset if hasattr(parent_node, "end_lineno"): - node.end_lineno = parent_node.end_lineno + node.end_lineno = parent_node.end_lineno # type: ignore[attr-defined] if hasattr(parent_node, "end_col_offset"): - node.end_col_offset = parent_node.end_col_offset + node.end_col_offset = parent_node.end_col_offset # type: ignore[attr-defined] self._parent_nodes.append(node) result = super().generic_visit(node) diff --git a/src/gt4py/next/ffront/dialect_parser.py b/src/gt4py/next/ffront/dialect_parser.py index 95240fca0c..771ef72016 100644 --- a/src/gt4py/next/ffront/dialect_parser.py +++ b/src/gt4py/next/ffront/dialect_parser.py @@ -110,9 +110,14 @@ def get_location(self, node: ast.AST) -> SourceLocation: line_offset = self.source_definition.line_offset col_offset = self.source_definition.column_offset + # `FixMissingLocations` ensures that all nodes have the location attributes + assert hasattr(node, "lineno") line = node.lineno + line_offset if node.lineno is not None else None + assert hasattr(node, "end_lineno") end_line = node.end_lineno + line_offset if node.end_lineno is not None else None + assert hasattr(node, "col_offset") column = 1 + node.col_offset + col_offset if node.col_offset is not None else None + assert hasattr(node, "end_col_offset") end_column = ( 1 + node.end_col_offset + col_offset if node.end_col_offset is not None else None ) diff --git a/src/gt4py/next/iterator/embedded.py b/src/gt4py/next/iterator/embedded.py index 0a352b800e..f7f2f0133c 100644 --- a/src/gt4py/next/iterator/embedded.py +++ b/src/gt4py/next/iterator/embedded.py @@ -271,7 +271,7 @@ class Column(np.lib.mixins.NDArrayOperatorsMixin): def __init__(self, kstart: int, data: np.ndarray | Scalar) -> None: self.kstart = kstart - assert isinstance(data, (np.ndarray, Scalar)) # type: ignore # mypy bug #11673 + assert isinstance(data, (np.ndarray, Scalar)) column_range: common.NamedRange = embedded_context.closure_column_range.get() self.data = ( data if isinstance(data, np.ndarray) else np.full(len(column_range.unit_range), data) @@ -560,7 +560,7 @@ def promote_scalars(val: CompositeOfScalarOrField): elif isinstance(val, common.Field): return val val_type = infer_dtype_like_type(val) - if isinstance(val, Scalar): # type: ignore # mypy bug + if isinstance(val, Scalar): return constant_field(val) else: raise ValueError(