Skip to content

Commit 39fc52d

Browse files
committed
Remove inconsistency between code which finds which packages provide which files
1 parent efc6a79 commit 39fc52d

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

pip_check_reqs/find_extra_reqs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ def find_extra_reqs(options):
2323
for package in search_packages_info(all_pkgs):
2424
log.debug('installed package: %s (at %s)', package['name'],
2525
package['location'])
26-
for f in package.get('files', []):
27-
path = os.path.realpath(os.path.join(package['location'], f))
26+
for package_file in package.get('files', []) or []:
27+
path = os.path.realpath(
28+
os.path.join(package['location'],package_file),
29+
)
2830
installed_files[path] = package['name']
2931
package_path = common.is_package_file(path)
3032
if package_path:

pip_check_reqs/find_missing_reqs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ def find_missing_reqs(options):
2626
for package in search_packages_info(all_pkgs):
2727
log.debug('installed package: %s (at %s)', package['name'],
2828
package['location'])
29-
for file in package.get('files', []) or []:
30-
path = os.path.realpath(os.path.join(package['location'], file))
29+
for package_file in package.get('files', []) or []:
30+
path = os.path.realpath(
31+
os.path.join(package['location'],package_file),
32+
)
3133
installed_files[path] = package['name']
3234
package_path = common.is_package_file(path)
3335
if package_path:

0 commit comments

Comments
 (0)