python/vague-module-name
| Rule | vague-module-name |
|---|---|
| Pack | Python |
| Severity | warning |
| Fix | none, edit by hand |
| Library versions | every version |
A module named utils, helpers or common does not say what it holds. Name it after its contents, and split it when the contents have no single name.
orders/├── utils.py # parse_date, round_price, retry├── dates.py # parse_date├── prices.py # round_price└── report.pyWhat the rule reports
Section titled “What the rule reports”The rule reports a module named util, utils, helper, helpers, common or misc, and a package
with one of the same names.
How to fix it
Section titled “How to fix it”xpd has no automatic fix, so make the change by hand.
The name says nothing about what the module holds, so unrelated code collects in it. Every other module then imports it. xpd reports the file on line 1.
Message
Section titled “Message”xpd prints this message with the issue. A name that starts with $ stands for code from your file.
This module's name does not say what it holds. Name it after its contents, and split it when the contents have no single name.Browse the other rules of the Python pack.