Skip to main content

Checks for old string formatting

Project description

https://github.com/gforcada/flake8-pep3101/actions/workflows/testing.yml/badge.svg?branch=main https://coveralls.io/repos/gforcada/flake8-pep3101/badge.svg?branch=main

Flake8 PEP 3101 plugin

Python has three string formatting options:

  • the old percent operator

  • the .format() string method

  • f-strings (only since python 3.6+)

Although f-strings are more ergonomic, there a certain scenarios where the .format() method is still the only viable option.

See pyformat website for examples of the percent operator vs the format() method.

For a more format definition see the PEP 3101.

This plugin is based on a python checker that was in plone.recipe.codeanalysis.

Install

Install with pip:

$ pip install flake8-pep3101

Requirements

  • Python 3.8, 3.9, 3.10, 3.11 and pypy3

  • flake8

Extras

If you want to check whether your new style formatting are correctly defined, check flake8-string-format plugin.

License

GPL 2.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 Distribution

flake8_pep3101-3.0.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

flake8_pep3101-3.0.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file flake8_pep3101-3.0.0.tar.gz.

File metadata

  • Download URL: flake8_pep3101-3.0.0.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for flake8_pep3101-3.0.0.tar.gz
Algorithm Hash digest
SHA256 15f5978cee8983912a55af16a66f3518eead3ed2df65e3ee5735451e4fe344db
MD5 dd2f56e764b4c201bfc4b405f55cae2f
BLAKE2b-256 c00c02b72d1eafb2cd8267ce04532013fbb7201e39f4c003d5087817074c1c3a

See more details on using hashes here.

File details

Details for the file flake8_pep3101-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: flake8_pep3101-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for flake8_pep3101-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 038f81231865d617ddf7be89a7e825cc0a6315e823304c896abc1243918e73cc
MD5 ddc5895ee921c59497e9a5335b7a6178
BLAKE2b-256 1db8b525fa00e80046061f13db76a9cf37e5fa67050c6190d663f983442c9a98

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