Skip to content

Commit 980dcfe

Browse files
committed
fix static type check
1 parent a2310cb commit 980dcfe

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pygmt/figure.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import base64
66
import os
7+
from collections.abc import Sequence
78
from pathlib import Path
89
from tempfile import TemporaryDirectory
910
from typing import Literal, overload
@@ -100,7 +101,7 @@ class Figure:
100101
def __init__(self) -> None:
101102
self._name = unique_name()
102103
self._preview_dir = TemporaryDirectory(prefix=f"{self._name}-preview-")
103-
self._current_region = None # Track the current region
104+
self._current_region: np.ndarray | None = None # Track the current region
104105
self._activate_figure()
105106

106107
def __del__(self) -> None:
@@ -135,7 +136,7 @@ def region(self) -> np.ndarray:
135136
wesn = lib.extract_region()
136137
return wesn
137138

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

0 commit comments

Comments
 (0)