Skip to content

Commit 937ec7b

Browse files
authored
Reuse obstore.store type hinting (#38)
1 parent 483327b commit 937ec7b

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "python/obstore"]
2+
path = python/_obstore
3+
url = https://github.com/developmentseed/obstore

python/_obstore

Submodule _obstore added at aaa8d6a

python/python/async_tiff/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
from typing import TYPE_CHECKING
2+
13
from ._async_tiff import *
24
from ._async_tiff import ___version
35

6+
if TYPE_CHECKING:
7+
from . import store
8+
49
__version__: str = ___version()

python/python/async_tiff/_tiff.pyi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
from typing import Any
2-
31
from ._ifd import ImageFileDirectory
2+
from .store import ObjectStore
43

54
class TIFF:
65
@classmethod
76
async def open(
8-
cls, path: str, *, store: Any, prefetch: int | None = 16384
7+
cls, path: str, *, store: ObjectStore, prefetch: int | None = 16384
98
) -> TIFF: ...
109
@property
1110
def ifds(self) -> list[ImageFileDirectory]: ...

python/python/async_tiff/store

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../_obstore/obstore/python/obstore/store

0 commit comments

Comments
 (0)