8000 GitHub - gforcada/flake8-pep3101: Checks for old string formatting. · GitHub
[go: up one dir, main page]

Skip to content

About

Checks for old string formatting.

Resources

Stars

14 stars

Watchers

3 watching

Forks

Repository files navigation

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

About

Checks for old string formatting.

Resources

Stars

14 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0