flake8 plugin which forbids nesting f-strings inside other f-strings.
Project description
flake8-nested-fstrings
flake8 plugin which forbids nesting f-strings inside other f-strings.
:warning: Python 3.12+
Installation
pip install flake8-nested-fstrings
Rationale
Quoting the zen of python:
Flat is better than nested.
Codes
| Code | Description |
|---|---|
| NFS001 | do not nest f-strings. |
as a pre-commit hook
See pre-commit for instructions
Sample .pre-commit-config.yaml:
- repo: https://github.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies: [flake8-nested-fstrings==1.1.0]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 flake8_nested_fstrings-1.2.0-py3-none-any.whl.
File metadata
- Download URL: flake8_nested_fstrings-1.2.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e182345593d2233288e75d95961e444cd2d45498fb3394a0d2accf3c15c41f4a
|
|
| MD5 |
d551242d30f14953eb9224036416e4a2
|
|
| BLAKE2b-256 |
c73ce70b11df081f30169c798f4e6de5566ab4a1654de01378d682b0c10460db
|