Skip to content

Commit e2aa465

Browse files
committed
refactor: rename variables
1 parent 045b0c4 commit e2aa465

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/auditwheel/repair.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def repair_wheel(
7373
for fn, v in external_refs_by_fn.items():
7474
ext_libs = v[abis[0]]["libs"] # type: Dict[str, str]
7575
replacements = [] # type: List[Tuple[str, str]]
76-
src_path_to_real_sonames = {} # type: Dict[str, str]
76+
src_path_real_soname_map = {} # type: Dict[str, str]
7777
same_soname_libs = defaultdict(set) # type: Dict[str, Set[str]]
7878
for soname, src_path in ext_libs.items():
7979
if src_path is None:
@@ -86,16 +86,13 @@ def repair_wheel(
8686
)
8787

8888
real_soname = patcher.get_soname(src_path)
89-
src_path_to_real_sonames[soname] = real_soname
89+
src_path_real_soname_map[soname] = src_path
9090
same_soname_libs[real_soname].add(soname)
9191

9292
if not copy_site_libs:
9393
for soname, src_path in ext_libs.items():
9494
if "site-packages" in str(src_path).split(os.path.sep):
95-
try:
96-
del same_soname_libs[src_path_to_real_sonames[soname]]
97-
except KeyError:
98-
pass
95+
same_soname_libs.pop(src_path_real_soname_map[src_path], None)
9996

10097
for real_soname, sonames in same_soname_libs.items():
10198
if len(sonames) == 0:

0 commit comments

Comments
 (0)