@torsava commented on this pull request.
Besides the two mostly cosmetic comments, I think it looks good!
> @@ -142,9 +210,23 @@ def convert(name, operator, version_id):
def normalize_name(name):
This function is now completely unused and can be removed.
> + @classmethod
+ def normalize_name(klass, name):
+ """https://www.python.org/dev/peps/pep-0503/#normalized-names"""
+ return re.sub(r'[-_.]+', '-', name).lower()
+
+ @classmethod
+ def legacy_normalize_name(klass, name):
+ """Like pkg_resources Distribution.key property"""
+ return re.sub(r'[-_]+', '-', name).lower()
Nitpick: I'm not excited about the `klass` name instead of the standard `cls`.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1317#pullrequestreview-506555419
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint