A flake8 extension that helps to make more readable variables names
Project description
flake8-variables-names
An extension for flake8 that helps to make more readable variables names.
We believe, that variable name should unmistakably shows, what it contains.
Thats why we try not to use varnames with only one symbol or not to use
too common names, such as result
, value
or info
.
This extensions helps to detect such names. By default it works in
non-strict mode. You can change it with --use-varnames-strict-mode
parameter end extend variable names blacklist even more.
Installation
pip install flake8-variables-names
Example
Sample file:
# test.py
a = 1
foo = 2
result = a + foo
Usage:
$ flake8 test.py
test.py:1:1: VNE001 single letter variable names are not allowed
test.py:2:1: VNE002 variable name should be clarified
Error codes
Error code | Description |
---|---|
VNE001 | single letter variable names like 'XXX' are not allowed |
VNE002 | variable name 'XXX' should be clarified |
VNE003 | variable names that shadow builtins are not allowed |
Contributing
We would love you to contribute to our project. It's simple:
- Create an issue with bug you found or proposal you have. Wait for approve from maintainer.
- Create a pull request. Make sure all checks are green.
- Fix review comments if any.
- Be awesome.
Here are useful tips:
- You can run all checks and tests with
make check
. Please do it before CI does. - We use BestDoctor python styleguide.
- We respect Django CoC. Make soft, not bullshit.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flake8_variables_names-0.0.6.tar.gz
.
File metadata
- Download URL: flake8_variables_names-0.0.6.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 292c50e4813d632aa3adcd02c185e7bb583f5fc8ebe02e70f13c958bfe46ad91 |
|
MD5 | c676dcf29fba5b7647b608972fdec251 |
|
BLAKE2b-256 | 6a4fa04c504e1cc53a17f296837cc98140707b45f2deaad6d3e34503c161a3b0 |
File details
Details for the file flake8_variables_names-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: flake8_variables_names-0.0.6-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4aff935d54b3f7afcd026b4dae55029877bd05a7c507b294b45bc7bf577d7b47 |
|
MD5 | a38953e0328dd3302cfd97d825857d3c |
|
BLAKE2b-256 | 3ae8845c33c7ac0f6c495c5cbcfebc6a281b28017570f2edea65b24daaed47f0 |