Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gforcada/flake8-pep3101
Checks for old string formatting.
https://github.com/gforcada/flake8-pep3101
Last synced: 2 days ago
JSON representation
Checks for old string formatting.
- Host: GitHub
- URL: https://github.com/gforcada/flake8-pep3101
- Owner: gforcada
- License: gpl-2.0
- Created: 2015-09-16T08:18:03.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2023-12-22T19:34:02.000Z (11 months ago)
- Last Synced: 2024-10-12T19:38:55.167Z (27 days ago)
- Language: Python
- Homepage: https://pypi.org/project/flake8-pep3101
- Size: 104 KB
- Stars: 14
- Watchers: 5
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-flake8-extensions - flake8-pep3101 - Report `%`-formatting. (Limitations)
README
.. -*- coding: utf-8 -*-
.. image:: https://github.com/gforcada/flake8-pep3101/actions/workflows/testing.yml/badge.svg?branch=main
:target: https://github.com/gforcada/flake8-pep3101/actions/workflows/testing.yml.. image:: https://coveralls.io/repos/gforcada/flake8-pep3101/badge.svg?branch=main
:target: https://coveralls.io/github/gforcada/flake8-pep3101?branch=mainFlake8 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
- flake8Extras
------
If you want to check whether your new style formatting are correctly defined,
check `flake8-string-format`_ plugin.License
-------
GPL 2.0.. _`pyformat website`: https://pyformat.info
.. _`PEP 3101`: https://www.python.org/dev/peps/pep-3101
.. _`f-strings`: https://peps.python.org/pep-0498/
.. _`flake8-string-format`: https://pypi.python.org/pypi/flake8-string-format
.. _`plone.recipe.codeanalysis`: https://pypi.python.org/pypi/plone.recipe.codeanalysis