From e5fefd1ac1c276fc07d21823a3c7443a34ae33fa Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 04:30:29 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- proxy/plugin/reverse_proxy.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/proxy/plugin/reverse_proxy.py b/proxy/plugin/reverse_proxy.py index 29db23f556..fb96e15486 100644 --- a/proxy/plugin/reverse_proxy.py +++ b/proxy/plugin/reverse_proxy.py @@ -40,20 +40,20 @@ def routes(self) -> List[Union[str, Tuple[str, List[bytes]]]]: return [ # A static route ( - r"/get$", - [b"http://httpbingo.org/get", b"https://httpbingo.org/get"], + r'/get$', + [b'http://httpbingo.org/get', b'https://httpbingo.org/get'], ), # A dynamic route to catch requests on "/get/"" # See "handle_route" method below for what we do when # this pattern matches. - r"/get/(\d+)$", + r'/get/(\d+)$', ] def handle_route(self, request: HttpParser, pattern: RePattern) -> Url: """For our example dynamic route, we want to simply convert any incoming request to "/get/1" into "/get?id=1" when serving from upstream. """ - choice: Url = Url.from_bytes(b"http://httpbingo.org/get") + choice: Url = Url.from_bytes(b'http://httpbingo.org/get') assert request.path result = re.search(pattern, request.path.decode()) if not result or len(result.groups()) != 1: