From e297147d7cb65f740644d2f6dbff58e1facd98a0 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 7 Oct 2025 11:30:33 -0500 Subject: [PATCH 1/3] Drop run-pylint script --- run-pylint.sh | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100755 run-pylint.sh diff --git a/run-pylint.sh b/run-pylint.sh deleted file mode 100755 index c103b82e..00000000 --- a/run-pylint.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -o errexit -o nounset - -ci_support="https://gitlab.tiker.net/inducer/ci-support/raw/main" - -if [[ ! -f .pylintrc.yml ]]; then - curl -o .pylintrc.yml "${ci_support}/.pylintrc-default.yml" -fi - - -if [[ ! -f .run-pylint.py ]]; then - curl -L -o .run-pylint.py "${ci_support}/run-pylint.py" -fi - - -PYLINT_RUNNER_ARGS="--jobs=4 --yaml-rcfile=.pylintrc.yml" - -if [[ -f .pylintrc-local.yml ]]; then - PYLINT_RUNNER_ARGS+=" --yaml-rcfile=.pylintrc-local.yml" -fi - -PYTHONWARNINGS=ignore python .run-pylint.py $PYLINT_RUNNER_ARGS $(basename $PWD) test/test_*.py examples "$@" From fd40940513ee8b2788837fe2d950359a883367e8 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 7 Oct 2025 11:30:46 -0500 Subject: [PATCH 2/3] Add bpr exclude --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 97401f07..72019ed4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -150,6 +150,13 @@ pythonPlatform = "All" reportImplicitOverride = "hint" +exclude = [ + "doc", + ".conda-root", + "build", + ".env", +] + [[tool.basedpyright.executionEnvironments]] root = "test" reportUnknownArgumentType = "hint" From 2e4bbb0d556b3bb28cec1f4fdeb7e253d9003be9 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 7 Oct 2025 11:31:06 -0500 Subject: [PATCH 3/3] Add ArrayContext.is_array_type --- arraycontext/context.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arraycontext/context.py b/arraycontext/context.py index 9be67495..5672a13e 100644 --- a/arraycontext/context.py +++ b/arraycontext/context.py @@ -125,7 +125,7 @@ ) from warnings import warn -from typing_extensions import Self, override +from typing_extensions import Self, TypeIs, override from pytools import memoize_method @@ -483,6 +483,10 @@ def outline(self, """ return f + @classmethod + def is_array_type(cls, obj: object) -> TypeIs[Array]: + return isinstance(obj, cls.array_types) + # undocumented for now @property @abstractmethod