File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55import base64
66import os
7+ from collections .abc import Sequence
78from pathlib import Path
89from tempfile import TemporaryDirectory
910from 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
You can’t perform that action at this time.
0 commit comments