Flake8 Variables Names is a Flake8 extension designed to promote more readable variable names in Python code. It identifies single-character variable names or overly common and ambiguous names such as 'result', 'value', or 'info', flagging them for clarification. The current version is 0.0.6, with releases occurring periodically to introduce new features and fix bugs.
pip install flake8-variables-namesVerified import paths — ran on the pinned version, not inferred.
After installation, `flake8-variables-names` automatically integrates with `flake8`. Run `flake8` from your terminal to apply checks. Configuration, including enabling strict mode, can be done via command-line arguments or in a `flake8` configuration file (e.g., `setup.cfg`, `tox.ini`, or `.flake8`).
Review existing code with multiple assignments (`a, b = 1, 2`) after updating to `0.0.6` to ensure compliance with the updated variable naming rules. Adjust variable names as required by the linter's output.
To enable more comprehensive checks, activate strict mode. Use the `--use-varnames-strict-mode` command-line option or add `use-varnames-strict-mode = True` to your `[flake8]` configuration in `setup.cfg`, `tox.ini`, or `.flake8`.
Familiarize yourself with the error codes: VNE001 for single-letter variable names, VNE002 for ambiguous/unclarified names, and VNE003 for names shadowing builtins. Refer to the plugin's documentation or source code for a complete list and their meanings to effectively resolve reported issues.