From fa701975e3b92f26f3f635139f056af2523837c0 Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Sat, 13 Jul 2024 15:56:17 +0200 Subject: [PATCH] style: fix linter and docs errors --- falcon/routing/compiled.py | 6 +++--- falcon/routing/util.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/falcon/routing/compiled.py b/falcon/routing/compiled.py index 864a006c0..3cf683a6d 100644 --- a/falcon/routing/compiled.py +++ b/falcon/routing/compiled.py @@ -22,7 +22,6 @@ import re from threading import Lock from typing import ( - TYPE_CHECKING, Any, Callable, Dict, @@ -30,9 +29,10 @@ Optional, Pattern, Set, - Union, Tuple, Type, + TYPE_CHECKING, + Union, ) from falcon.routing import converters @@ -43,7 +43,7 @@ from falcon.util.sync import wrap_sync_to_async if TYPE_CHECKING: # TODO: switch to TYPE_CHECKING once support for py3.5 is dropped - from falcon.request import Request + from falcon import Request _CxElement = Union['_CxParent', '_CxChild'] _MethodDict = Dict[str, Callable] diff --git a/falcon/routing/util.py b/falcon/routing/util.py index 37908020b..684699a3e 100644 --- a/falcon/routing/util.py +++ b/falcon/routing/util.py @@ -15,8 +15,9 @@ """Routing utilities.""" from __future__ import annotations + import re -from typing import Optional, Dict, Callable +from typing import Callable, Dict, Optional from falcon import constants from falcon import responders