Skip to content

Commit

Permalink
chore: ignore typing for 1 line because it is unclear how to fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
vytas7 committed Dec 16, 2023
1 parent 636244c commit 603ddbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions falcon/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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]
Expand Down

0 comments on commit 603ddbc

Please sign in to comment.