From 60ef94908b042e8deddbb7a7fcebc25a4688cb30 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Sun, 24 Nov 2024 09:27:21 +0100 Subject: [PATCH 1/3] ruff: fix re errors --- arraycontext/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arraycontext/version.py b/arraycontext/version.py index 05fe8763..d33045f0 100644 --- a/arraycontext/version.py +++ b/arraycontext/version.py @@ -4,7 +4,7 @@ def _parse_version(version: str) -> tuple[tuple[int, ...], str]: import re - m = re.match("^([0-9.]+)([a-z0-9]*?)$", VERSION_TEXT) + m = re.match(r"^([0-9.]+)([a-z0-9]*?)$", VERSION_TEXT) assert m is not None return tuple(int(nr) for nr in m.group(1).split(".")), m.group(2) From ca2d7c40553a73411e62c4e10d5aa094e30ca65c Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Sun, 24 Nov 2024 09:30:11 +0100 Subject: [PATCH 2/3] pyproject: switch to hatchling --- MANIFEST.in | 10 ---------- pyproject.toml | 20 ++------------------ 2 files changed, 2 insertions(+), 28 deletions(-) delete mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 1cd7e74e..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,10 +0,0 @@ -include doc/*.rst -include doc/conf.py -include doc/make.bat -include doc/Makefile -prune doc/_* - -prune .github -exclude .gitignore -exclude .gitlab-ci.yml -exclude .test-conda-env-py3.yml diff --git a/pyproject.toml b/pyproject.toml index 0755deb5..0daaa214 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,6 @@ [build-system] -build-backend = "setuptools.build_meta" -requires = [ - "setuptools>=63", -] +requires = ["hatchling"] +build-backend = "hatchling.build" [project] name = "arraycontext" @@ -57,20 +55,6 @@ test = [ Documentation = "https://documen.tician.de/arraycontext" Homepage = "https://github.com/inducer/arraycontext" -[tool.setuptools.packages.find] -include = [ - "arraycontext*", -] - -[tool.setuptools.package-dir] -# https://github.com/Infleqtion/client-superstaq/pull/715 -"" = "." - -[tool.setuptools.package-data] -pytools = [ - "py.typed", -] - [tool.ruff] preview = true From 994b7c85ee7bd7dd8eceab9815a5899fb2efafe8 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Sun, 24 Nov 2024 10:00:22 +0100 Subject: [PATCH 3/3] mypy: ignore pytato errors --- arraycontext/impl/pytato/utils.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arraycontext/impl/pytato/utils.py b/arraycontext/impl/pytato/utils.py index 5b059992..2d624d9a 100644 --- a/arraycontext/impl/pytato/utils.py +++ b/arraycontext/impl/pytato/utils.py @@ -160,7 +160,10 @@ def map_data_wrapper(self, expr: DataWrapper) -> Array: # https://github.com/pylint-dev/pylint/issues/3893 # pylint: disable=unexpected-keyword-arg - return DataWrapper( + # type-ignore: discussed at + # https://github.com/inducer/arraycontext/pull/289#discussion_r1855523967 + # possibly related: https://github.com/python/mypy/issues/17375 + return DataWrapper( # type: ignore[call-arg] data=new_dw.data, shape=expr.shape, axes=expr.axes, @@ -190,7 +193,10 @@ def map_data_wrapper(self, expr: DataWrapper) -> Array: # https://github.com/pylint-dev/pylint/issues/3893 # pylint: disable=unexpected-keyword-arg - return DataWrapper( + # type-ignore: discussed at + # https://github.com/inducer/arraycontext/pull/289#discussion_r1855523967 + # possibly related: https://github.com/python/mypy/issues/17375 + return DataWrapper( # type: ignore[call-arg] data=np_data, shape=expr.shape, axes=expr.axes,