This Flake8 plugin for checking complicated assignment expressions.
Project description
flake8-complicated-walrus
This Flake8 plugin for checking complicated assignment expressions. There are 3 levels for this linter:
- restrict-all - restrict use assignment expressions in any case
- restrict-complicated - restrict use assignment expressions in complex if conditions
- allow-all - allow use assignment expressions in any case
Quick Start Guide
-
Install
flake8-complicated-walrus
from PyPI with pip::pip install flake8-complicated-walrus
-
Configure a mark that you would like to validate::
cd project_root/ vi setup.cfg
-
Add to file following:
[flake8] restrict-walrus-level = restrict-complicated
-
Run flake8::
flake8 .
flake8 codes
- FCW100: You cannot use assignment expression.
- FCW200: You cannot use assignment expression in complicated if statements.
Settings
restrict-walrus-level
It specifies restrict level for linting your code.
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_complicated_walrus-2.1.0.tar.gz
.
File metadata
- Download URL: flake8_complicated_walrus-2.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.5 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b039d020186cbbfbab9a71e6d58621d63d85412300903504d51b6a7b19b461b |
|
MD5 | d86217bb757142b21bf2b0d9d76e117c |
|
BLAKE2b-256 | c2fd3b87a5ba0876b136e375c68cfa4fc4bd2e5ec28459784acca25a52085d97 |
File details
Details for the file flake8_complicated_walrus-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: flake8_complicated_walrus-2.1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.5 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4e18d1915740d03abea324781c3b3b338245d39e0948f944e45fb36a4155786 |
|
MD5 | 99291edd6329cb89278bae933f7ab35d |
|
BLAKE2b-256 | 6acf20e0549d1135c03730b92e007349d51a4f83863e15cd4af35ff2b0fa956a |