From 810edbcbc1ad3773f8b733fd1b2938fc8fb03f15 Mon Sep 17 00:00:00 2001 From: Marcus Pasell Date: Thu, 2 Jun 2022 09:34:27 -0700 Subject: [PATCH] Fix multiple route params regex (#3186) --- .../flake8_plugins/flask_decorator_plugin/visitor_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discovery-provider/flake8_plugins/flask_decorator_plugin/visitor_helpers.py b/discovery-provider/flake8_plugins/flask_decorator_plugin/visitor_helpers.py index 45f713e4a85..34d9cbbd31b 100644 --- a/discovery-provider/flake8_plugins/flask_decorator_plugin/visitor_helpers.py +++ b/discovery-provider/flake8_plugins/flask_decorator_plugin/visitor_helpers.py @@ -23,7 +23,7 @@ def is_route_decorator(decorator: ast.Call): return isinstance(decorator.func, ast.Attribute) and decorator.func.attr == "route" -route_parser_regex = re.compile(".*<[^:]*:?(.*)>.*") +route_parser_regex = re.compile("<[^:]*:?([^>]*)>") def is_route_decorator_documented(route_decorator: ast.Call):