Skip to content

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.py

The rule reports a module named util, utils, helper, helpers, common or misc, and a package with one of the same names.

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.

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.