Skip to content

Commit 9fbcdd3

Browse files
committed
fix(pagination): add docstrings to __getitem__ overload stubs for pydocstyle D105
1 parent 98d6900 commit 9fbcdd3

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

pyiceberg/utils/pagination.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,14 @@ def __ne__(self, other: object) -> bool:
117117
# ------------------------------------------------------------------
118118

119119
@overload
120-
def __getitem__(self, idx: SupportsIndex) -> T: ...
120+
def __getitem__(self, idx: SupportsIndex) -> T:
121+
"""Return item at integer index, fetching pages as needed."""
122+
...
121123

122124
@overload
123-
def __getitem__(self, idx: slice) -> list[T]: ...
125+
def __getitem__(self, idx: slice) -> list[T]:
126+
"""Return slice, fetching all remaining pages first."""
127+
...
124128

125129
def __getitem__(self, idx: SupportsIndex | slice) -> T | list[T]:
126130
"""Fetch pages as needed before returning the requested item(s)."""

0 commit comments

Comments
 (0)