You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
open_geotiff: source kwarg lacks str | BinaryIO type annotation #1754
The api-consistency sweep on 2026-05-12 found that open_geotiff(source, ...) lacks a type annotation on its source parameter, while sibling reader and writer functions on the same public surface are annotated.
Detail
Current signature (xrspatial/geotiff/init.py:644):
The annotation gap on open_geotiff(source) reads as a documentation bug: type checkers and IDEs cannot see that BytesIO is accepted, even though it works at runtime and is documented.
PR #1654 annotated window, path, and on_gpu_failure across the public surface but skipped source on open_geotiff. This issue closes that gap.
Severity
MEDIUM (Cat 3, type hints / docstring drift). Surface-only fix; no runtime behaviour change, no deprecation impact, no defaults change. BinaryIO is already imported under TYPE_CHECKING in the module so the runtime cost stays at zero.
Activity
Annotate open_geotiff(source) as str | BinaryIO (#1754) (#1758)
Annotate reader trio dtype kwarg as str | np.dtype | None (#1775) (#1777