Skip to content

Commit 607b8f7

Browse files
committed
Fixing typing hints
1 parent ffe4d02 commit 607b8f7

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

auditwheel/repair.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@
2828
re.VERBOSE).match
2929

3030

31-
def _is_in_list(soname: str, items: Optional[List[str]]) -> str:
32-
for item in items:
31+
def _is_in_list(soname: str, items: Optional[List[str]]) -> Optional[str]:
32+
for item in (items or []):
3333
if item in soname:
3434
return item
35+
return None
3536

3637

37-
def _filter(items: List[str]) -> List[str]:
38-
return [_.strip() for _ in items if _.strip()]
38+
def _filter(items: Optional[List[str]]) -> List[str]:
39+
return [_.strip() for _ in (items or []) if _.strip()]
3940

4041

4142
def repair_wheel(wheel_path: str, abis: List[str], lib_sdir: str, out_dir: str,

0 commit comments

Comments
 (0)