A flake8 plugin that forces your variable to be declared, and not duplicately declared.
Project description
variable_declaration_checker
We have migrated to Flake8 as Pylint's performance becomes a bottleneck on larger projects. Since our workflow focuses on file-by-file linting rather than cross-module dependency checks, Flake8 is a better fit. If you still prefer Pylint, use
variable-declaration-checker==0.0.7.
Installation and Basic Usage
pip install variable-declaration-checker
flake8 --select WVarDec
Issue and PR GuideLine
We want this plugin to work with Visual Studio Code. Therefore, all behaviors that conflict with Pylance need to be eliminated. For example, if you find that not adding type annotations causes warnings from this plugin, while adding type annotations causes errors in Pylance, please report it to us.
However, ast does not provide complete type information. This necessitates expanding the scope of some features. For example, we can detect if a type has a base class called "Enum" and thus ignore variable definitions within it. However, it's difficult to detect if this Enum is actually from the system library (even parsing imports doesn't achieve this, as creating a module with the same name is possible). Therefore, it will also affect a custom type called "Enum".
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file variable_declaration_checker-0.1.1.tar.gz.
File metadata
- Download URL: variable_declaration_checker-0.1.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbb63a056492e154c95c7a9c13b83f9dea0b42d016d5b9e2ab3fcaf667b0be8b
|
|
| MD5 |
1570c6ac81c0d192f583a86687e0b1d3
|
|
| BLAKE2b-256 |
bc5048a53f15f695f6d518c553ee85ef5ef9f4fce02b6c3d76da0ca8384df79d
|
File details
Details for the file variable_declaration_checker-0.1.1-py3-none-any.whl.
File metadata
- Download URL: variable_declaration_checker-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d29ac00b5b3fbcb25836e156c7c8b180208a3caf4ccd21787b3a6255609e147
|
|
| MD5 |
dc7bbb284d4ab7135125bee9e1a16c59
|
|
| BLAKE2b-256 |
17556a030a886f44fc091ad8e82f70606b3fb79cbe167f28b755d7929f3a27bd
|