Skip to content

Commit e3b9065

Browse files
committed
Work around bpr errors only shown in CI
1 parent 30c4658 commit e3b9065

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,12 @@ reportExplicitAny = "none"
155155
# https://github.com/microsoft/pyright/issues/746
156156
reportImportCycles = "none"
157157

158+
# Some errors get flagged in CI, but not locally. This makes it awkward to
159+
# include those in the baseline, so they get ignored with 'pyright: ignore'.
160+
# Local runs now flag this as unnecessary. Downgrading to hint to avoid
161+
# circular complaints.
162+
reportUnnecessaryTypeIgnoreComment = "hint"
163+
158164
pythonVersion = "3.10"
159165
pythonPlatform = "All"
160166

pytato/loopy.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,9 @@ def extend_bindings_with_shape_inference(knl: lp.LoopKernel,
426426

427427
from loopy.kernel.array import ArrayBase
428428
from loopy.symbolic import get_dependencies as lpy_get_deps
429-
from pymbolic.mapper.substitutor import make_subst_func
429+
from pymbolic.mapper.substitutor import (
430+
make_subst_func, # pyright: ignore[reportUnknownVariableType]
431+
)
430432
from pymbolic.primitives import is_expression
431433

432434
from pytato.transform import SizeParamGatherer

pytato/scalar_expr.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ def substitute(expression: Expression,
268268
if variable_assignments is None:
269269
variable_assignments = {}
270270

271-
from pymbolic.mapper.substitutor import make_subst_func
271+
from pymbolic.mapper.substitutor import (
272+
make_subst_func, # pyright: ignore[reportUnknownVariableType]
273+
)
272274
return SubstitutionMapper(make_subst_func(variable_assignments))(expression)
273275

274276

pytato/target/loopy/codegen.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ def loopy_substitute(
132132
variable_assignments: Mapping[str, Expression]
133133
) -> Expression:
134134
from loopy.symbolic import SubstitutionMapper
135-
from pymbolic.mapper.substitutor import make_subst_func
135+
from pymbolic.mapper.substitutor import (
136+
make_subst_func, # pyright: ignore[reportUnknownVariableType]
137+
)
136138

137139
# {{{ early exit for identity substitution
138140

0 commit comments

Comments
 (0)