@s-t-e-v-e-n-k commented on this pull request.
> + @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()
Ah, good point! staticmethod makes much more sense.
--
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#discussion_r503586786
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint