From b96025f63f4d30ba6263e8fd3da771f679711472 Mon Sep 17 00:00:00 2001 From: Aleksandr Mangin Date: Fri, 25 Nov 2022 14:05:08 +0100 Subject: [PATCH] migrated from optparse --- flake8_quotes/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake8_quotes/__init__.py b/flake8_quotes/__init__.py index 3113d7c..034b7cf 100644 --- a/flake8_quotes/__init__.py +++ b/flake8_quotes/__init__.py @@ -107,19 +107,19 @@ def _register_opt(parser, *args, **kwargs): @classmethod def add_options(cls, parser): cls._register_opt(parser, '--quotes', action='store', - parse_from_config=True, type='choice', + parse_from_config=True, type=str, choices=sorted(cls.INLINE_QUOTES.keys()), help='Deprecated alias for `--inline-quotes`') cls._register_opt(parser, '--inline-quotes', default="'", - action='store', parse_from_config=True, type='choice', + action='store', parse_from_config=True, type=str, choices=sorted(cls.INLINE_QUOTES.keys()), help="Quote to expect in all files (default: ')") cls._register_opt(parser, '--multiline-quotes', default=None, action='store', - parse_from_config=True, type='choice', + parse_from_config=True, type=str, choices=sorted(cls.MULTILINE_QUOTES.keys()), help='Quote to expect in all files (default: """)') cls._register_opt(parser, '--docstring-quotes', default=None, action='store', - parse_from_config=True, type='choice', + parse_from_config=True, type=str, choices=sorted(cls.DOCSTRING_QUOTES.keys()), help='Quote to expect in all files (default: """)') cls._register_opt(parser, '--avoid-escape', default=None, action='store_true',