Checks for old string formatting.
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 with pip:
$ pip install flake8-pep3101
- Python 2.7, 3.5, 3.6
If you want to check whether your new style formatting are correctly defined, check flake8-string-format plugin.
- Fix text on the error message. [icemac]
- Handle when there are numbers in either side of the modulo operator. [gforcada]
- Handle variable formatting (i.e. my_string_variable % ('one', 'two', )). [gforcada]
- Test againsta Python 3.6. [gforcada]
- Release universal wheels as well. [gforcada]
- Remove tox and use plain travis matrix to test. [gforcada]
- Test on python 2.7, python 3.5, pypy and pypy3. [gforcada]
- Require flake8 3.0. [gforcada]
- Use ast to analyze the code. The regular expression used so far was mostly a hit or miss, with each corner case making it even more difficult to read. The new checker with ast is simple, elegant and so much easy to read. [gforcada]
- 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]
- 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]
- 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]
- Allow stdin processing, this way text editor can pass input to flake8. [mjacksonw]
- 0.1 was a brown bag release. [gforcada]
- Initial release [gforcada]
- Create the flake8 plugin per se. [gforcada]
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|flake8_pep3101-1.2.1-py2.py3-none-any.whl (3.6 kB) Copy SHA256 hash SHA256||Wheel||py2.py3||Apr 5, 2018|
|flake8-pep3101-1.2.1.tar.gz (13.3 kB) Copy SHA256 hash SHA256||Source||None||Apr 5, 2018|