-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
needs-decisionAwaiting a decision from a maintainerAwaiting a decision from a maintainerruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Description
I only recently found out about importlib.metadata.version as a way of getting the installed version of a package; as opposed to reading some global __version__ variable that may or may not be properly exported.
I would love a rule that encouraged the use of the more portable & reliable importlib variant, although I have a feeling that a simple rule that detected any from ... import __version__ would raise a bunch of false alarms on packages that export it as ways of versioning ... other things than the package itself. (maybe only trigger if importing from the top namespace of a module?) Or idk other weird stuff.
Anyway, thought I'd throw out the idea anyway and see if it sticks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs-decisionAwaiting a decision from a maintainerAwaiting a decision from a maintainerruleImplementing or modifying a lint ruleImplementing or modifying a lint rule