- add __len__ and axes to PyShape stub

This commit is contained in:
w.pomp
2026-07-24 10:29:15 +02:00
parent c16e71bf30
commit c975b1943f
2 changed files with 9 additions and 2 deletions
+7
View File
@@ -27,6 +27,8 @@ class Shape:
def y(self) -> builtins.int: ... def y(self) -> builtins.int: ...
@property @property
def x(self) -> builtins.int: ... def x(self) -> builtins.int: ...
@property
def axes(self) -> builtins.str: ...
def __new__( def __new__(
cls, cls,
order: builtins.str, order: builtins.str,
@@ -51,6 +53,7 @@ class Shape:
def __getitem__( def __getitem__(
self, idx: str | int | None | Ellipsis | slice | list[int] | tuple[int] self, idx: str | int | None | Ellipsis | slice | list[int] | tuple[int]
) -> typing.Optional[int | list[int]]: ... ) -> typing.Optional[int | list[int]]: ...
def __len__(self) -> builtins.int: ...
def to_list(self) -> builtins.list[builtins.int]: ... def to_list(self) -> builtins.list[builtins.int]: ...
class View: class View:
@@ -346,6 +349,10 @@ class View:
register: builtins.bool = False, register: builtins.bool = False,
no_scaling: builtins.bool = False, no_scaling: builtins.bool = False,
) -> None: ... ) -> None: ...
def set_cache_size(self, size: builtins.int) -> None:
r"""
backwards compatibility
"""
def __pow__( def __pow__(
self, self,
other: View | numpy.typing.NDArray | int | float, other: View | numpy.typing.NDArray | int | float,
+2 -2
View File
@@ -4,7 +4,7 @@ build-backend = "maturin"
[project] [project]
name = "ndbioimage" name = "ndbioimage"
version = "2027.0.1" version = "2027.0.2"
requires-python = ">=3.10" requires-python = ">=3.10"
classifiers = [ classifiers = [
"License :: OSI Approved :: MIT License", "License :: OSI Approved :: MIT License",
@@ -35,7 +35,7 @@ ndbioimage_generate_stub = "ndbioimage:ndbioimage_generate_stub"
[tool.maturin] [tool.maturin]
python-source = "py" python-source = "py"
features = ["python", "bioformats_java", "gpl-formats", "tiff", "tiffseq", "tiffwrite", "movie"] features = ["python", "bioformats_java", "gpl-formats", "czi", "tiff", "tiffseq", "tiffwrite", "movie"]
no-default-features = true no-default-features = true
module-name = "ndbioimage.ndbioimage_rs" module-name = "ndbioimage.ndbioimage_rs"
include = ["py/ndbioimage/jassets/j4rs*", "py/ndbioimage/deps/libj4rs*"] include = ["py/ndbioimage/jassets/j4rs*", "py/ndbioimage/deps/libj4rs*"]