Skip to content

Commit 2183825

Browse files
committed
Documented deprecation of quotes in favor of inline-quotes
1 parent a25fcba commit 2183825

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

README.rst

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ Flake8 Extension to lint for quotes.
55
:target: https://travis-ci.org/zheller/flake8-quotes
66
:alt: Build Status
77

8+
Deprecation notice in 0.3.0
9+
---------------------------
10+
To anticipate multiline support, we are renaming ``--quotes`` to ``--inline-quotes``. Please adjust your configurations appropriately.
11+
812
Usage
913
-----
1014

@@ -24,10 +28,10 @@ By default, we expect single quotes (') and look for unwanted double quotes (").
2428

2529
.. code:: shell
2630
27-
flake8 --quotes '"'
31+
flake8 --inline-quotes '"'
2832
2933
or configuration option in `tox.ini`/`setup.cfg`.
3034

3135
.. code:: ini
3236
33-
quotes = "
37+
inline-quotes = "

flake8_quotes/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import tokenize
2+
import warnings
23

34
import pep8
45

@@ -39,6 +40,9 @@ def add_options(cls, parser):
3940
@classmethod
4041
def parse_options(cls, options):
4142
if hasattr(options, 'quotes') and options.quotes is not None:
43+
# https://docs.python.org/2/library/warnings.html#warnings.warn
44+
warnings.warn('flake8-quotes has deprecated `quotes` in favor of `inline-quotes`. '
45+
'Please update your configugration')
4246
cls.inline_quotes = cls.INLINE_QUOTES[options.quotes]
4347
else:
4448
cls.inline_quotes = cls.INLINE_QUOTES[options.inline_quotes]

0 commit comments

Comments
 (0)