https://github.com/mrswats/flake8-nested-fstrings
A flake8 plugin which forbids nested fstrings.
https://github.com/mrswats/flake8-nested-fstrings
flake8 flake8-plugin python
Last synced: 3 months ago
JSON representation
A flake8 plugin which forbids nested fstrings.
- Host: GitHub
- URL: https://github.com/mrswats/flake8-nested-fstrings
- Owner: mrswats
- License: mit
- Created: 2023-10-02T19:06:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-11-22T19:26:46.000Z (4 months ago)
- Last Synced: 2025-11-22T21:13:26.701Z (4 months ago)
- Topics: flake8, flake8-plugin, python
- Language: Python
- Homepage:
- Size: 44.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/mrswats/flake8-nested-fstrings/actions/workflows/main.yml)
# 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](https://github.com/pre-commit/pre-commit) for instructions
Sample `.pre-commit-config.yaml`:
```yaml
- repo: https://github.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies: [flake8-nested-fstrings==1.1.0]
```