Page MenuHomePhabricator

Represent precision in pywikibot.WbTime as an Enum
Open, LowPublicFeature

Description

Feature summary (what you would like to be able to do and where): Instead of using a dictionary, using an enum would make more sense, as the precision values are values in an enum.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution): It would lead to clearer code as pywikibot.WbTime.Precision.year, and an enum would help make the distinction more clear than just a mapping of key to ints.

Benefits (why should this be implemented?): Cleaner code