Skip to main content

flake8-variables-names

Build Status Maintainability Test Coverage PyPI version PyPI - Python Version

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:

Metadata

Release files for flake8-variables-names 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flake8-variables-names 0.0.4
File Size Uploaded
flake8_variables_names-0.0.4.tar.gz 4.7 kB Details

Release files / flake8_variables_names-0.0.4.tar.gz

Download URL flake8_variables_names-0.0.4.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d6fa0571a807c72940b5773827c5760421ea6f8206595ff0a8ecfa01e42bf2cf
BLAKE2b-256 checksum
How to use checksums
d36e6469dd210319d44e71d437d3814991a893b26ea49a220978d560d2e26f52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

Release history Release notifications | RSS feed

0.0.6

2 release files

0.0.5

2 release files

This release

0.0.4 This release

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page