@torsava 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()
> I wonder why it is a classmethod and not a staticmethod (when it does not use
> the "kalss" attribute at all). I would make it a property, but initialized
> value is fine as well.
It's also used outside of this class, so it can't be a property. But a static
method/function makes 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_r503360841
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint