flake8-complicated-walrus
This Flake8 plugin for checking that first param of callable object is simple string. Plugin will check for specified callable objects that it is not allowed to use f-sting, .format method, string concat and % statement for first parameter
Quick Start Guide
-
Install
flake8-simple-string-first-argfrom PyPI with pip::pip install flake8-simple-string-first-arg -
Configure a mark that you would like to validate::
cd project_root/ vi setup.cfg -
Add to file following:
[flake8] simple-string-first-arg = SomeClassName, OtherClassName:url -
Run flake8::
flake8 .
flake8 codes
- SFA100: In calling {CallableName} f-string is used
- SFA200: In calling {CallableName} string.format() is used
- SFA300: In calling {CallableName} string concatenation ("+") is used
- SFA400: In calling {CallableName} "%" is used
Settings
simple-string-first-arg
It specifies a list of name of callable objects, that should have simple string as first arg.
You can add the name of the argument via : to check if it is passed as a named parameter.
Metadata
Release files for flake8-simple-string-first-arg 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flake8_simple_string_first_arg-0.1.0.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flake8_simple_string_first_arg-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.1 kB
Release files / flake8_simple_string_first_arg-0.1.0.tar.gz
| Download URL | flake8_simple_string_first_arg-0.1.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa8de934520307d46301477650aa3f8e22aea3533e5b7726b54b72e8669b3d43
|
|
BLAKE2b-256 checksum How to use checksums |
f7c5e1d1dfd02884bcbb04a7b159ff031a08e15c46a5ecfade72b79e28232cbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.4 Darwin/22.1.0
|
Release files / flake8_simple_string_first_arg-0.1.0-py3-none-any.whl
| Download URL | flake8_simple_string_first_arg-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ef91fbbea7ffb53bb97bf0cf79a38ba2e4fedaad925c161cf30d5da841d3634
|
|
BLAKE2b-256 checksum How to use checksums |
fdf4797fd53ce20e2bfb845130fc8a1629b8961a00a58f1cfd9a09f22b107cad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.4 Darwin/22.1.0
|