git: e135e158c3de - main - devel/py-flake8-import-order: fix with flake8 6.x

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Thu, 24 Nov 2022 19:48:55 UTC
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e135e158c3de0a9b69cb8b312927d0135b2630bf

commit e135e158c3de0a9b69cb8b312927d0135b2630bf
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2022-11-24 19:18:37 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2022-11-24 19:48:10 +0000

    devel/py-flake8-import-order: fix with flake8 6.x
---
 devel/py-flake8-import-order/Makefile             |  5 +--
 devel/py-flake8-import-order/files/patch-flake8-6 | 44 +++++++++++++++++++++++
 2 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/devel/py-flake8-import-order/Makefile b/devel/py-flake8-import-order/Makefile
index f57b37bcec2f..6c4424c9100f 100644
--- a/devel/py-flake8-import-order/Makefile
+++ b/devel/py-flake8-import-order/Makefile
@@ -1,13 +1,14 @@
 PORTNAME=	flake8-import-order
 PORTVERSION=	0.18.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	amdmi3@FreeBSD.org
 COMMENT=	Flake8 and pylama plugin that checks the ordering of import statements
-WWW=		https://pypi.org/project/flake8-import-order/
+WWW=		https://pypi.org/project/flake8-import-order/ \
+		https://github.com/PyCQA/flake8-import-order
 
 LICENSE=	LGPL3
 LICENSE_FILE=	${WRKSRC}/COPYING
diff --git a/devel/py-flake8-import-order/files/patch-flake8-6 b/devel/py-flake8-import-order/files/patch-flake8-6
new file mode 100644
index 000000000000..c77bc82a1279
--- /dev/null
+++ b/devel/py-flake8-import-order/files/patch-flake8-6
@@ -0,0 +1,44 @@
+From 231a632a294bb303d7d50ccc1d7650526493efa7 Mon Sep 17 00:00:00 2001
+From: Mike Bayer <mike_mp@zzzcomputing.com>
+Date: Wed, 23 Nov 2022 17:36:42 -0500
+Subject: [PATCH] repair register opt calls
+
+flake8 uses only argparse option styles now, use
+str instead of "string" for types given.
+
+Fixes: #189
+---
+ flake8_import_order/flake8_linter.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/flake8_import_order/flake8_linter.py b/flake8_import_order/flake8_linter.py
+index c6fb1ba..7734592 100644
+--- flake8_import_order/flake8_linter.py
++++ flake8_import_order/flake8_linter.py
+@@ -25,7 +25,7 @@ def add_options(cls, parser):
+             "--application-import-names",
+             default="",
+             action="store",
+-            type="string",
++            type=str,
+             help="Import names to consider as application-specific",
+             parse_from_config=True,
+             comma_separated_list=True,
+@@ -35,7 +35,7 @@ def add_options(cls, parser):
+             "--application-package-names",
+             default="",
+             action="store",
+-            type="string",
++            type=str,
+             help=("Package names to consider as company-specific "
+                   "(used only by 'appnexus' style)"),
+             parse_from_config=True,
+@@ -46,7 +46,7 @@ def add_options(cls, parser):
+             "--import-order-style",
+             default=DEFAULT_IMPORT_ORDER_STYLE,
+             action="store",
+-            type="string",
++            type=str,
+             help=("Style to follow. Available: " +
+                   ", ".join(cls.list_available_styles())),
+             parse_from_config=True,