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.2.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for flake8_nested_fstrings-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e182345593d2233288e75d95961e444cd2d45498fb3394a0d2accf3c15c41f4a
MD5 d551242d30f14953eb9224036416e4a2
BLAKE2b-256 c73ce70b11df081f30169c798f4e6de5566ab4a1654de01378d682b0c10460db

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