Note: Because flake8-quotes has since been updated and supports all of the features of this package, this package was not uploaded to PyPI as it would have been redundant.
This module provides a plugin for flake8, the Python code checker, that checks for PEP-8 string quote consistency. This plugin does not validate docstring formats. See the pep257 package for that.
You can install, upgrade, and uninstall flake8-strings
with these commands:
$ pip install flake8-strings $ pip install --upgrade flake8-strings $ pip uninstall flake8-strings
When both flake8
and flake8-strings
are installed, the plugin is
available in flake8
:
$ flake8 --version 2.4.1 (pep8: 1.5.7, flake8-strings: 0.1, pyflakes: 0.8.1, mccabe: 0.3.1)
By default the plugin is enabled and set to enforce single quoted strings (as repr() uses):
$ flake8 test.py test.py:1:10: S800 Inconsistent string quotes found, should be '
But can be reconfigured to enforce double quoted strings:
$ flake8 --string-quotes=double test.py test.py:2:10: S800 Inconsistent string quotes found, should be "
- First release.