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.
Metadata
Release files for flake8-simple-string-first-arg 0.1.1
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.1.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flake8_simple_string_first_arg-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.1 kB
Release files / flake8_simple_string_first_arg-0.1.1.tar.gz
| Download URL | flake8_simple_string_first_arg-0.1.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ed3ac5dfd9249e24a107b7d2999b3b34e4bbd293a150d20b4f894a1014a73e6
|
|
BLAKE2b-256 checksum How to use checksums |
09a5ceab3d5312d2fae9f4dbdbdd1dfb5690cc099816f6ce75efe7b88d40e72b
|
| 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.1-py3-none-any.whl
| Download URL | flake8_simple_string_first_arg-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0db5cc16d098f22c83aa71b87c388f56fc007f020df013a0707bd91e73d2826c
|
|
BLAKE2b-256 checksum How to use checksums |
12f35e699f6cc1e5e8013527d788d18fdc42a81c35d55c24f7eec24f2ca6a64e
|
| 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
|