◐ Shell
reader mode source ↗
Skip to content
Merged
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
4 changes: 0 additions & 4 deletions git/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1200,8 +1200,6 @@ def __getattr__(self, attr: str) -> T_IterableObj:
return list.__getattribute__(self, attr)

def __getitem__(self, index: Union[SupportsIndex, int, slice, str]) -> T_IterableObj: # type: ignore[override]
assert isinstance(index, (int, str, slice)), "Index of IterableList should be an int or str"

if isinstance(index, int):
return list.__getitem__(self, index)
elif isinstance(index, slice):
Expand All @@ -1214,8 +1212,6 @@ def __getitem__(self, index: Union[SupportsIndex, int, slice, str]) -> T_Iterabl
# END handle getattr

def __delitem__(self, index: Union[SupportsIndex, int, slice, str]) -> None:
assert isinstance(index, (int, str)), "Index of IterableList should be an int or str"

delindex = cast(int, index)
if not isinstance(index, int):
delindex = -1
Expand Down
Loading
Toggle all file notes Toggle all file annotations