Reduce indentation in warn_on_mismatching_name
Why: Makes it easier to read IMO.
@@ -459,7 +459,11 @@ class InstallRequirement(object):
def warn_on_mismatching_name(self):
metadata_name = canonicalize_name(self.metadata["Name"])
- if canonicalize_name(self.req.name) != metadata_name:
+ if canonicalize_name(self.req.name) == metadata_name:
+ # Everything is fine.
+ return
+
+ # If we're here, there's a mismatch. Log a warning about it.
logger.warning(
'Generating metadata for package %s '
'produced metadata for project name %s. Fix your '
