Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.rst #106

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 27 additions & 15 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,37 @@ Q003 Change outer quotes to avoid escaping inner quotes
Configuration
-------------

By default, we expect single quotes (') and look for unwanted double quotes ("). To expect double quotes (") and find unwanted single quotes ('), use the CLI option:
By default, we expect single quotes (``'``) and look for unwanted double quotes (``"``).

To expect double quotes (``"``) and find unwanted single quotes (``'``), use the CLI option:

.. code:: shell

flake8 --inline-quotes '"'
# We also support "double" and "single"
# flake8 --inline-quotes 'double'
#
# We also support configuration for multiline quotes
# flake8 --inline-quotes '"' --multiline-quotes "'"
# We also support "'''"
# flake8 --inline-quotes '"' --multiline-quotes "'''"
#
# We also support docstring quotes similarly
# flake8 --inline-quotes '"' --docstring-quotes "'"
# flake8 --inline-quotes '"' --docstring-quotes "'''"

# We also support disabling escaping quotes
# flake8 --no-avoid-escape
Additionally, we expect multiline quotes and docstrings to use (``"""``) and look for unwanted (``'''``).

To expect single quote versions (``'''``) and find unwanted doubble quote versions (``"""``), use the CLI option:

.. code:: shell

# For multiline quotes:
flake8 --multiline-quotes "'''"
# We also support "'"
# flake8 "'"

# For docstrings:
flake8 --docstring-quotes "'''"
# Also supports "'" format
# flake8 --docstring-quotes "'"

We also support disabling escaping quotes:

.. code:: shell

flake8 --no-avoid-escape

or configuration option in `tox.ini`/`setup.cfg`.

Expand All @@ -80,13 +92,13 @@ or configuration option in `tox.ini`/`setup.cfg`.
# inline-quotes = double
#
# We also support configuration for multiline quotes
# multiline-quotes = ''''
# Also supports "'"
# multiline-quotes = '
# We also support "'''"
# multiline-quotes = '''
#
# We also support docstring quotes similarly
# docstring-quotes = '
# docstring-quotes = '''
# docstring-quotes = '
#
# We also support disabling escaping quotes
# avoid-escape = False
Expand Down