Skip to content

Commit 9b3488e

Browse files
authored
Fix two static type errors reported by mypy 2.0.0 (#4626)
1 parent 2f61d38 commit 9b3488e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pygmt/clib/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
DTYPES = DTYPES_NUMERIC | DTYPES_TEXT
111111

112112
# Dictionary for storing the values of GMT constants.
113-
GMT_CONSTANTS = {}
113+
GMT_CONSTANTS: dict[str, int] = {}
114114

115115
# Load the GMT library outside the Session class to avoid repeated loading.
116116
_libgmt = load_libgmt()

pygmt/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def _get_default_display_method() -> Literal["external", "notebook", "none"]:
9393

9494
# A registry of all figures that have had "show" called in this session.
9595
# This is needed for the sphinx-gallery scraper in pygmt/sphinx_gallery.py
96-
SHOWED_FIGURES = []
96+
SHOWED_FIGURES: list["Figure"] = []
9797
# Configurations for figure display.
9898
SHOW_CONFIG = {
9999
"method": _get_default_display_method(), # The image preview display method.

0 commit comments

Comments
 (0)