From 72420048b739a865312a28cf429cbd5394cefecf Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 7 May 2026 17:47:20 +0800 Subject: [PATCH] Fix two static type errors reported by mypy 2.0.0 --- pygmt/clib/session.py | 2 +- pygmt/figure.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/clib/session.py b/pygmt/clib/session.py index aa8de0fbcb3..9a4564d6771 100644 --- a/pygmt/clib/session.py +++ b/pygmt/clib/session.py @@ -110,7 +110,7 @@ DTYPES = DTYPES_NUMERIC | DTYPES_TEXT # Dictionary for storing the values of GMT constants. -GMT_CONSTANTS = {} +GMT_CONSTANTS: dict[str, int] = {} # Load the GMT library outside the Session class to avoid repeated loading. _libgmt = load_libgmt() diff --git a/pygmt/figure.py b/pygmt/figure.py index a1494c29fd8..0979fe07158 100644 --- a/pygmt/figure.py +++ b/pygmt/figure.py @@ -93,7 +93,7 @@ def _get_default_display_method() -> Literal["external", "notebook", "none"]: # A registry of all figures that have had "show" called in this session. # This is needed for the sphinx-gallery scraper in pygmt/sphinx_gallery.py -SHOWED_FIGURES = [] +SHOWED_FIGURES: list["Figure"] = [] # Configurations for figure display. SHOW_CONFIG = { "method": _get_default_display_method(), # The image preview display method.