Skip to content

fix: update mypy type-ignore code in dem algorithm to [call-overload]#1449

Merged
vincentsarago merged 1 commit into
developmentseed:mainfrom
wakame1367:fix/dem-mypy-call-overload
Jul 20, 2026
Merged

fix: update mypy type-ignore code in dem algorithm to [call-overload]#1449
vincentsarago merged 1 commit into
developmentseed:mainfrom
wakame1367:fix/dem-mypy-call-overload

Conversation

@wakame1367

Copy link
Copy Markdown
Contributor

What

The mypy CI step is currently failing on main (and therefore on every open PR)
because the numpy typing stubs now report the masked-array assignments in the
DEM algorithms as [call-overload] errors instead of [index]:

src/titiler/core/titiler/core/algorithm/dem.py:182: error: No overload variant of "__getitem__" of "generic" matches argument type "int"  [call-overload]
src/titiler/core/titiler/core/algorithm/dem.py:182: note: Error code "call-overload" not covered by "type: ignore[index]" comment

The existing # type: ignore [index] comments no longer cover the reported
error code, so mypy fails.

This PR updates the two ignore comments to [call-overload] to match the code
numpy now emits. No runtime behavior changes.

Changes

  • titiler/core/algorithm/dem.py: # type: ignore [index] -> # type: ignore [call-overload] (lines 182 and 242)

I noticed this while working on #1448 — the failure is unrelated to that PR and
pre-existing on main (e.g. the CI run for the merge commit on main also fails
with the same two dem.py errors).

🤖 Generated with Claude Code

The numpy typing stubs now report the masked-array assignment as a
[call-overload] error instead of [index], leaving the existing
`# type: ignore [index]` comments uncovered and breaking the mypy CI step.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@vincentsarago vincentsarago left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@vincentsarago
vincentsarago merged commit b3194b4 into developmentseed:main Jul 20, 2026
9 checks passed
@ds-release-bot ds-release-bot Bot mentioned this pull request Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants