Skip to main content

Checks for old string formatting.

Project description

https://travis-ci.org/gforcada/flake8-pep3101.svg?branch=master https://coveralls.io/repos/gforcada/flake8-pep3101/badge.svg?branch=master&service=github

Flake8 PEP 3101 plugin

Python has two string formatting options, either the old percent operator or the new .format() string method.

Being the new one more powerful, expressive and a drop-in replacement over the old one.

See pyformat website for lots of examples of old vs new formatting.

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 2.7, 3.5

  • flake8

Extras

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

License

GPL 2.0

Changelog

0.6 (2016-10-29)

  • Handle edge case when a single or double quoted string has another pair of quotes inside (‘lala “lu” la’) with some % symbol inside as well. [gforcada]

0.5 (2016-10-26)

  • Add all possible string formatters. [gforcada]

  • Fix extension to work with flake8 > 3.0. [gforcada]

  • Fix crash when the % symbol was the last character of a line. [gforcada]

0.4 (2016-07-03)

  • Rename pep8 to pycodestyle. [alefteris]

  • Add support for python 3.5. [alefteris]

  • Add flake8 pypi classifier. [alefteris]

  • Drop python 3.3 and 3.4 support (only testing it probably works just fine). [gforcada]

  • Fix travis and coveralls to work properly with python 3.5. [gforcada]

0.3 (2016-03-05)

  • Allow stdin processing, this way text editor can pass input to flake8. [mjacksonw]

0.2 (2015-09-16)

  • 0.1 was a brown bag release. [gforcada]

0.1 (2015-09-16)

  • Initial release [gforcada]

  • Create the flake8 plugin per se. [gforcada]

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-0.6.tar.gz (13.0 kB view details)

Uploaded Source

File details

Details for the file flake8-pep3101-0.6.tar.gz.

File metadata

  • Download URL: flake8-pep3101-0.6.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for flake8-pep3101-0.6.tar.gz
Algorithm Hash digest
SHA256 c4c846e25052cb10d37ed542c122c068a96a14188aeb9841cab4a985adc819c2
MD5 af7c33be49ddd10df1bee28960469f45
BLAKE2b-256 1e5cc444de0c5101b248958bee0a2ac6395d512aecbd5aa2cd96e0845b873184

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