Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bf51609

Browse filesBrowse files
authored
Merge pull request #2028 from gcmarx/remove-type-assertions
remove type assertions from util.py
2 parents aa6b7e9 + 8dc7552 commit bf51609
Copy full SHA for bf51609

File tree

1 file changed

+0
-4
lines changed
Filter options

1 file changed

+0
-4
lines changed

‎git/util.py

Copy file name to clipboardExpand all lines: git/util.py
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,8 +1200,6 @@ def __getattr__(self, attr: str) -> T_IterableObj:
12001200
return list.__getattribute__(self, attr)
12011201

12021202
def __getitem__(self, index: Union[SupportsIndex, int, slice, str]) -> T_IterableObj: # type: ignore[override]
1203-
assert isinstance(index, (int, str, slice)), "Index of IterableList should be an int or str"
1204-
12051203
if isinstance(index, int):
12061204
return list.__getitem__(self, index)
12071205
elif isinstance(index, slice):
@@ -1214,8 +1212,6 @@ def __getitem__(self, index: Union[SupportsIndex, int, slice, str]) -> T_Iterabl
12141212
# END handle getattr
12151213

12161214
def __delitem__(self, index: Union[SupportsIndex, int, slice, str]) -> None:
1217-
assert isinstance(index, (int, str)), "Index of IterableList should be an int or str"
1218-
12191215
delindex = cast(int, index)
12201216
if not isinstance(index, int):
12211217
delindex = -1

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.