Skip to content

Commit eb5bd08

Browse files
committed
doc: stop using "list" to describe a tuple
Several properties return tuples of items but are documented to return lists. Fix the docs. Signed-off-by: Benjamin Gilbert <[email protected]>
1 parent 754a2d9 commit eb5bd08

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

doc/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ OpenSlide objects
132132

133133
.. attribute:: level_dimensions
134134

135-
A list of ``(width, height)`` tuples, one for each level of the slide.
135+
A tuple of ``(width, height)`` tuples, one for each level of the slide.
136136
``level_dimensions[k]`` are the dimensions of level ``k``.
137137

138138
.. attribute:: level_downsamples
139139

140-
A list of downsample factors for each level of the slide.
140+
A tuple of downsample factors for each level of the slide.
141141
``level_downsamples[k]`` is the downsample factor of level ``k``.
142142

143143
.. attribute:: properties
@@ -409,12 +409,12 @@ Deep Zoom or a similar format.
409409

410410
.. attribute:: level_tiles
411411

412-
A list of ``(tiles_x, tiles_y)`` tuples for each Deep Zoom level.
412+
A tuple of ``(tiles_x, tiles_y)`` tuples for each Deep Zoom level.
413413
``level_tiles[k]`` are the tile counts of level ``k``.
414414

415415
.. attribute:: level_dimensions
416416

417-
A list of ``(pixels_x, pixels_y)`` tuples for each Deep Zoom level.
417+
A tuple of ``(pixels_x, pixels_y)`` tuples for each Deep Zoom level.
418418
``level_dimensions[k]`` are the dimensions of level ``k``.
419419

420420
.. method:: get_dzi(format)

openslide/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def level_count(self) -> int:
9898

9999
@property
100100
def level_dimensions(self) -> tuple[tuple[int, int], ...]:
101-
"""A list of (width, height) tuples, one for each level of the image.
101+
"""A tuple of (width, height) tuples, one for each level of the image.
102102
103103
level_dimensions[n] contains the dimensions of level n."""
104104
raise NotImplementedError
@@ -110,7 +110,7 @@ def dimensions(self) -> tuple[int, int]:
110110

111111
@property
112112
def level_downsamples(self) -> tuple[float, ...]:
113-
"""A list of downsampling factors for each level of the image.
113+
"""A tuple of downsampling factors for each level of the image.
114114
115115
level_downsample[n] contains the downsample factor of level n."""
116116
raise NotImplementedError
@@ -217,7 +217,7 @@ def level_count(self) -> int:
217217

218218
@property
219219
def level_dimensions(self) -> tuple[tuple[int, int], ...]:
220-
"""A list of (width, height) tuples, one for each level of the image.
220+
"""A tuple of (width, height) tuples, one for each level of the image.
221221
222222
level_dimensions[n] contains the dimensions of level n."""
223223
return tuple(
@@ -226,7 +226,7 @@ def level_dimensions(self) -> tuple[tuple[int, int], ...]:
226226

227227
@property
228228
def level_downsamples(self) -> tuple[float, ...]:
229-
"""A list of downsampling factors for each level of the image.
229+
"""A tuple of downsampling factors for each level of the image.
230230
231231
level_downsample[n] contains the downsample factor of level n."""
232232
return tuple(
@@ -402,7 +402,7 @@ def level_count(self) -> Literal[1]:
402402

403403
@property
404404
def level_dimensions(self) -> tuple[tuple[int, int]]:
405-
"""A list of (width, height) tuples, one for each level of the image.
405+
"""A tuple of (width, height) tuples, one for each level of the image.
406406
407407
level_dimensions[n] contains the dimensions of level n."""
408408
if self._image is None:
@@ -411,7 +411,7 @@ def level_dimensions(self) -> tuple[tuple[int, int]]:
411411

412412
@property
413413
def level_downsamples(self) -> tuple[float]:
414-
"""A list of downsampling factors for each level of the image.
414+
"""A tuple of downsampling factors for each level of the image.
415415
416416
level_downsample[n] contains the downsample factor of level n."""
417417
return (1.0,)

openslide/deepzoom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,12 @@ def level_count(self) -> int:
163163

164164
@property
165165
def level_tiles(self) -> tuple[tuple[int, int], ...]:
166-
"""A list of (tiles_x, tiles_y) tuples for each Deep Zoom level."""
166+
"""A tuple of (tiles_x, tiles_y) tuples for each Deep Zoom level."""
167167
return self._t_dimensions
168168

169169
@property
170170
def level_dimensions(self) -> tuple[tuple[int, int], ...]:
171-
"""A list of (pixels_x, pixels_y) tuples for each Deep Zoom level."""
171+
"""A tuple of (pixels_x, pixels_y) tuples for each Deep Zoom level."""
172172
return self._z_dimensions
173173

174174
@property

0 commit comments

Comments
 (0)