Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix static type check
  • Loading branch information
Chuan1937 committed Jan 14, 2026
commit 980dcfe4f0f370c16f3ab948ea13e2d13ede8f04
5 changes: 3 additions & 2 deletions pygmt/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import base64
import os
from collections.abc import Sequence
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Literal, overload
Expand Down Expand Up @@ -100,7 +101,7 @@ class Figure:
def __init__(self) -> None:
self._name = unique_name()
self._preview_dir = TemporaryDirectory(prefix=f"{self._name}-preview-")
self._current_region = None # Track the current region
self._current_region: np.ndarray | None = None # Track the current region
self._activate_figure()

def __del__(self) -> None:
Expand Down Expand Up @@ -135,7 +136,7 @@ def region(self) -> np.ndarray:
wesn = lib.extract_region()
return wesn

def _update_current_region(self, region) -> None:
def _update_current_region(self, region: str | Sequence[float] | np.ndarray | None) -> None:
"""
Update the current region tracking.

Expand Down
Loading