Skip to main content

flake8 plugin which forbids nesting f-strings inside other f-strings.

Project description

build status

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

If you're not sure about the file name format, learn more about wheel file names.

flake8_nested_fstrings-1.1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file flake8_nested_fstrings-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_nested_fstrings-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32236eec97ba1de21cef839ddb8dd03cb6a05d3b29a69ec27e8fe1d240cb9b29
MD5 a7c7effe928c7e9f24016c3c82e8c525
BLAKE2b-256 e7bd09ec0a7c30785024bc5a03989b79d4b69be6f8ecc03fdf84aec33d43ca64

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page