From 603ddbc9dfdbb9071d220283611528aac684ada0 Mon Sep 17 00:00:00 2001 From: Vytautas Liuolia Date: Sat, 16 Dec 2023 18:30:41 +0100 Subject: [PATCH] chore: ignore typing for 1 line because it is unclear how to fix it --- falcon/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/falcon/app.py b/falcon/app.py index ad4e03ca1..434dd6b39 100644 --- a/falcon/app.py +++ b/falcon/app.py @@ -448,7 +448,7 @@ def __call__( # noqa: C901 def router_options(self): return self._router.options - def add_middleware(self, middleware: object) -> None: + def add_middleware(self, middleware: Union[object, Iterable]) -> None: """Add one or more additional middleware components. Arguments: @@ -462,7 +462,7 @@ def add_middleware(self, middleware: object) -> None: # the chance that middleware may be None. if middleware: try: - middleware = list(middleware) + middleware = list(middleware) # type: ignore except TypeError: # middleware is not iterable; assume it is just one bare component middleware = [middleware]