Skip to content
This repository has been archived by the owner on Jul 1, 2018. It is now read-only.

johnthagen/flake8-strings

Repository files navigation

PEP-8 String Quote Consistency

image

image

image

image

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.

Installation

You can install, upgrade, and uninstall flake8-strings with these commands:

$ pip install flake8-strings
$ pip install --upgrade flake8-strings
$ pip uninstall flake8-strings

Plugin for Flake8

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)

Run

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 "

0.1 - 2015-10-17

  • First release.

About

Flake8 string quote plugin.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages