Skip to content

Update mypy#895

Merged
vincentsarago merged 11 commits intostac-utils:mainfrom
jonhealy1:update-mypy
Apr 2, 2026
Merged

Update mypy#895
vincentsarago merged 11 commits intostac-utils:mainfrom
jonhealy1:update-mypy

Conversation

@jonhealy1
Copy link
Copy Markdown
Collaborator

@jonhealy1 jonhealy1 commented Apr 1, 2026

Related Issue(s):

  • None

Description:

  • fix mypy type errors in transaction extension for Python 3.14 compatibility (mypy 1.20.0)

PR Checklist:

  • pre-commit hooks pass locally
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable, and docs build successfully (run make docs)
  • Changes are added to the CHANGELOG.

@jonhealy1 jonhealy1 requested a review from vincentsarago April 1, 2026 15:56
@jonhealy1 jonhealy1 requested a review from gadomski April 1, 2026 16:07
@jonhealy1 jonhealy1 marked this pull request as ready for review April 1, 2026 16:09
@jonhealy1 jonhealy1 requested a review from hrodmn April 1, 2026 16:21
Copy link
Copy Markdown
Member

@gadomski gadomski left a comment

Choose a reason for hiding this comment

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

Just checking, all of the changes in this PR were from running pre-commit run --all-files, which did reformatting as well (b/c of the ruff upgrade)?

@jonhealy1
Copy link
Copy Markdown
Collaborator Author

@gadomski I tried to follow your instructions from #891

@jonhealy1
Copy link
Copy Markdown
Collaborator Author

These had to be fixed:

stac_fastapi/extensions/stac_fastapi/extensions/core/transaction/transaction.py:111: error: No overload variant of "setitem" of "list" matches argument types "str", "list[Any]" [call-overload]
stac_fastapi/extensions/stac_fastapi/extensions/core/transaction/transaction.py:111: note: Possible overload variants:
stac_fastapi/extensions/stac_fastapi/extensions/core/transaction/transaction.py:111: note: def setitem(self, SupportsIndex, list[dict[str, str]], /) -> None
stac_fastapi/extensions/stac_fastapi/extensions/core/transaction/transaction.py:111: note: def setitem(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], Iterable[list[dict[str, str]]], /) -> None
stac_fastapi/extensions/stac_fastapi/extensions/core/transaction/transaction.py:111: error: Item "list[list[dict[str, str]]]" of "Any | list[list[dict[str, str]]]" has no attribute "values" [union-attr]
stac_fastapi/extensions/stac_fastapi/extensions/core/transaction/transaction.py:149: error: No overload variant of "setitem" of "list" matches argument types "str", "list[Any]" [call-overload]
stac_fastapi/extensions/stac_fastapi/extensions/core/transaction/transaction.py:149: note: Possible overload variants:
stac_fastapi/extensions/stac_fastapi/extensions/core/transaction/transaction.py:149: note: def setitem(self, SupportsIndex, list[dict[str, str]], /) -> None
stac_fastapi/extensions/stac_fastapi/extensions/core/transaction/transaction.py:149: note: def setitem(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], Iterable[list[dict[str, str]]], /) -> None
stac_fastapi/extensions/stac_fastapi/extensions/core/transaction/transaction.py:150: error: Item "list[list[dict[str, str]]]" of "Any | list[list[dict[str, str]]]" has no attribute "values" [union-attr]
Found 4 errors in 1 file (checked 60 source files)

@jonhealy1
Copy link
Copy Markdown
Collaborator Author

I was able to fix the invalid_intervals change in test_rfc339.py but locally ruff keeps formatting it back?

@jonhealy1
Copy link
Copy Markdown
Collaborator Author

@gadomski I thought you were suggesting in #891 that I make these changes. I can close this.

Comment thread stac_fastapi/extensions/stac_fastapi/extensions/core/transaction/transaction.py Outdated
Comment thread stac_fastapi/extensions/stac_fastapi/extensions/core/transaction/transaction.py Outdated
@vincentsarago vincentsarago self-requested a review April 2, 2026 08:25
@vincentsarago vincentsarago merged commit 145c2f0 into stac-utils:main Apr 2, 2026
6 checks passed
@jonhealy1 jonhealy1 deleted the update-mypy branch April 2, 2026 10:48
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.

3 participants