flake8-simple-string-first-arg
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.
Release files for flake8-simple-string-first-arg 0.2.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.2.0.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flake8_simple_string_first_arg-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.2 kB
Release files / flake8_simple_string_first_arg-0.2.0.tar.gz
| Download URL | flake8_simple_string_first_arg-0.2.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
887baee6a8bd223e6dec60606cbfabfce0840db395f171d62551c72740215103
|
|
BLAKE2b-256 checksum How to use checksums |
3b34d286cf25ca75c1d2182c36a0c08f58cc8c2568a8e3d1ba1abca6b9f98ccd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.4 Darwin/22.5.0
|
Release files / flake8_simple_string_first_arg-0.2.0-py3-none-any.whl
| Download URL | flake8_simple_string_first_arg-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2315e79636dc3ec84c7027934c7ca88595218d642a87686a36a9e363a53041c2
|
|
BLAKE2b-256 checksum How to use checksums |
45d7c55592ca2b1f265f6b41b3ee656f29cd17e57d60bc21e9d706bead8e65ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.4 Darwin/22.5.0
|