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.0.0]
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for flake8_nested_fstrings-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2009e6aed3bc813422c4c5711f35c24b414f7fd6d2ba7c6116fed93794dd229a |
|
MD5 | f04c00a57aac8d62896f5778e8f48494 |
|
BLAKE2b-256 | 6187ab1a904b2e4fe615d7f0ce77240c8d7bbb5ce280876c3781b10215a1ee3a |