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.0.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

flake8_nested_fstrings-1.0.1-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

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