Extract the canonical_name from name itself instead of using dist.get
twice
@@ -138,7 +138,7 @@ def print_results(distributions, list_files=False, verbose=False):
write_output("---")
name = dist.get('name', '')
- canonical_name = canonicalize_name(dist.get('name', ''))
+ canonical_name = canonicalize_name(name)
required_by = [
pkg.project_name for pkg in pkg_resources.working_set
if canonical_name in [required.name for required in pkg.requires()]
