From 78ba2401cbd0b54d2cddcf99bfd46903269e3429 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 25 Dec 2025 21:36:10 +0100 Subject: [PATCH 1/2] Typing fix: DTypeLike can no longer be None in numpy 2.4 --- meshmode/discretization/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshmode/discretization/__init__.py b/meshmode/discretization/__init__.py index d962154f..5b985ed2 100644 --- a/meshmode/discretization/__init__.py +++ b/meshmode/discretization/__init__.py @@ -389,7 +389,7 @@ def __init__(self, actx: ArrayContext, mesh: Mesh, group_factory: ElementGroupFactory, - real_dtype: DTypeLike = None, + real_dtype: DTypeLike | None = None, _force_actx_clone: bool = True) -> None: """ :arg actx: an :class:`arraycontext.ArrayContext` used to perform @@ -485,7 +485,7 @@ def is_modal(self) -> bool: def _new_array(self, actx: ArrayContext, creation_func: Callable[[tuple[int, int], np.dtype[Any]], Array], - dtype: DTypeLike = None + dtype: DTypeLike | None = None ): if dtype is None: dtype = self.real_dtype @@ -503,7 +503,7 @@ def _new_array(self, 1: DiscretizationDOFAxisTag() }, result) - def empty(self, actx: ArrayContext, dtype: DTypeLike = None) -> _DOFArray: + def empty(self, actx: ArrayContext, dtype: DTypeLike | None = None) -> _DOFArray: """Return an empty :class:`~meshmode.dof_array.DOFArray`. :arg dtype: type special value 'c' will result in a @@ -519,7 +519,7 @@ def empty(self, actx: ArrayContext, dtype: DTypeLike = None) -> _DOFArray: return self._new_array(actx, actx.np.zeros, dtype=dtype) - def zeros(self, actx: ArrayContext, dtype: DTypeLike = None) -> _DOFArray: + def zeros(self, actx: ArrayContext, dtype: DTypeLike | None = None) -> _DOFArray: """Return a zero-initialized :class:`~meshmode.dof_array.DOFArray`. :arg dtype: type special value 'c' will result in a From e9943536c031f937d33c38f90ec9efb4530da883 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 25 Dec 2025 21:36:15 +0100 Subject: [PATCH 2/2] Update baseline --- .basedpyright/baseline.json | 382 ++---------------------------------- 1 file changed, 19 insertions(+), 363 deletions(-) diff --git a/.basedpyright/baseline.json b/.basedpyright/baseline.json index 0e523ddc..a63dccc3 100644 --- a/.basedpyright/baseline.json +++ b/.basedpyright/baseline.json @@ -899,14 +899,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 23, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -2437,14 +2429,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 39, - "endColumn": 46, - "lineCount": 1 - } - }, { "code": "reportAttributeAccessIssue", "range": { @@ -3993,6 +3977,14 @@ "lineCount": 1 } }, + { + "code": "reportUnknownMemberType", + "range": { + "startColumn": 21, + "endColumn": 28, + "lineCount": 1 + } + }, { "code": "reportUnknownMemberType", "range": { @@ -6763,14 +6755,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 17, - "endColumn": 24, - "lineCount": 1 - } - }, { "code": "reportUnknownArgumentType", "range": { @@ -7715,14 +7699,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 33, - "endColumn": 40, - "lineCount": 1 - } - }, { "code": "reportUnknownArgumentType", "range": { @@ -9965,14 +9941,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 23, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -9997,14 +9965,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 19, - "endColumn": 26, - "lineCount": 1 - } - }, { "code": "reportPossiblyUnboundVariable", "range": { @@ -12591,14 +12551,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 21, - "endColumn": 28, - "lineCount": 1 - } - }, { "code": "reportUnannotatedClassAttribute", "range": { @@ -18559,14 +18511,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 23, - "endColumn": 30, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -18911,14 +18855,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 19, - "endColumn": 27, - "lineCount": 1 - } - }, { "code": "reportUnknownArgumentType", "range": { @@ -19679,14 +19615,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 23, - "endColumn": 30, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -22573,14 +22501,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 19, - "endColumn": 26, - "lineCount": 1 - } - }, { "code": "reportUnknownArgumentType", "range": { @@ -22605,22 +22525,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 28, - "endColumn": 35, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 30, - "endColumn": 37, - "lineCount": 1 - } - }, { "code": "reportUnknownArgumentType", "range": { @@ -22661,14 +22565,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 19, - "endColumn": 26, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -22741,14 +22637,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 21, - "endColumn": 28, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -23111,14 +22999,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 18, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -23143,38 +23023,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 14, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 14, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 42, - "endColumn": 50, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -23231,54 +23079,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 15, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 15, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 15, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 15, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 16, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 46, - "endColumn": 66, - "lineCount": 1 - } - }, { "code": "reportUnknownVariableType", "range": { @@ -23335,86 +23135,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 16, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 46, - "endColumn": 43, - "lineCount": 3 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -23447,14 +23167,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 30, - "endColumn": 37, - "lineCount": 1 - } - }, { "code": "reportUnknownVariableType", "range": { @@ -24035,22 +23747,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 23, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 30, - "endColumn": 37, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -24076,10 +23772,18 @@ } }, { - "code": "reportUnknownVariableType", + "code": "reportUnknownMemberType", "range": { - "startColumn": 8, - "endColumn": 9, + "startColumn": 12, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAssignmentType", + "range": { + "startColumn": 12, + "endColumn": 43, "lineCount": 1 } }, @@ -25931,14 +25635,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 9, - "endColumn": 17, - "lineCount": 1 - } - }, { "code": "reportUnknownVariableType", "range": { @@ -26058,46 +25754,6 @@ "endColumn": 32, "lineCount": 1 } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 12, - "endColumn": 61, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 12, - "endColumn": 61, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 12, - "endColumn": 61, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 12, - "endColumn": 61, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 29, - "endColumn": 36, - "lineCount": 1 - } } ], "./meshmode/mesh/visualization.py": [