Skip to content

Conversation

@seisman
Copy link
Member

@seisman seisman commented Oct 14, 2024

The "Static Type Checks" workflow started to fail due to the newly released mypy v1.12.0 (https://github.com/GenericMappingTools/pygmt/actions/runs/11330529462).

I don't know if it's an indented change or a newly introduced bug, and I don't have a solution for it, so just ignore the mypy error.

mypy pygmt
pygmt/datasets/load_remote_dataset.py:444: error: Value of type "Literal['gridline', 'pixel'] | None" is not indexable  [index]
Found 1 error in 1 file (checked 106 source files)
make: *** [Makefile:74: typecheck] Error 1

@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog final review call This PR requires final review and approval from a second reviewer labels Oct 14, 2024
@seisman seisman added this to the 0.14.0 milestone Oct 14, 2024
@weiji14 weiji14 changed the title Silent a mypy warning with mypy v1.12.0 Silence a mypy warning with mypy v1.12.0 Oct 14, 2024
Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

Yeah, None can't be indexed, and we do need to keep the None option for automatic determination of gridline/pixel registration (handled at L427-L429). Not sure how to workaround the typechecker here too, so ok to ignore for now.

@weiji14 weiji14 merged commit ab84be9 into main Oct 14, 2024
21 of 22 checks passed
@weiji14 weiji14 deleted the fix-mypy branch October 14, 2024 21:22
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants