From e2fb158690a9c1b3f924a56268e33f174db31e446cc4aeb9870954458d502ecf Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 19 Dec 2022 09:55:59 +0000 Subject: [PATCH] Accepting request 1043726 from home:marxin:branches:devel:languages:python - Add support-flake8-6.patch in order to support flake8 version 6. OBS-URL: https://build.opensuse.org/request/show/1043726 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8-quotes?expand=0&rev=16 --- python-flake8-quotes.changes | 5 +++++ python-flake8-quotes.spec | 2 ++ support-flake8-6.patch | 37 ++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 support-flake8-6.patch diff --git a/python-flake8-quotes.changes b/python-flake8-quotes.changes index 9af9c13..fe88775 100644 --- a/python-flake8-quotes.changes +++ b/python-flake8-quotes.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Dec 19 09:01:02 UTC 2022 - Martin Liška + +- Add support-flake8-6.patch in order to support flake8 version 6. + ------------------------------------------------------------------- Sat Jan 15 15:42:47 UTC 2022 - Dirk Müller diff --git a/python-flake8-quotes.spec b/python-flake8-quotes.spec index df19f6b..b99e0bf 100644 --- a/python-flake8-quotes.spec +++ b/python-flake8-quotes.spec @@ -26,6 +26,7 @@ License: MIT Group: Development/Languages/Python URL: https://github.com/zheller/flake8-quotes/ Source: https://files.pythonhosted.org/packages/source/f/flake8-quotes/flake8-quotes-%{version}.tar.gz +Patch0: support-flake8-6.patch BuildRequires: %{python_module flake8 >= 3.3.0} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} @@ -40,6 +41,7 @@ Flake8 Extension to lint for quotes. %prep %setup -q -n flake8-quotes-%{version} +%patch0 -p1 %build %python_build diff --git a/support-flake8-6.patch b/support-flake8-6.patch new file mode 100644 index 0000000..6fd53b4 --- /dev/null +++ b/support-flake8-6.patch @@ -0,0 +1,37 @@ +From 46d1fdba5c8fb08ae95cdba07b443cd770f8feee Mon Sep 17 00:00:00 2001 +From: Alexandru Fikl +Date: Thu, 24 Nov 2022 08:48:03 +0200 +Subject: [PATCH] update add_options for flake8 6.0 + +--- + 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..7344e3d 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, + 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, + 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, + 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, + 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',