relax errorhandler function arg type

This commit is contained in:
David Lord 2022-03-15 07:35:59 -07:00
parent 0ef1e65f6a
commit 8886328822
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
5 changed files with 19 additions and 27 deletions

View file

@ -1265,9 +1265,7 @@ class Flask(Scaffold):
self.shell_context_processors.append(f)
return f
def _find_error_handler(
self, e: Exception
) -> t.Optional["ErrorHandlerCallable[Exception]"]:
def _find_error_handler(self, e: Exception) -> t.Optional["ErrorHandlerCallable"]:
"""Return a registered error handler for an exception in this order:
blueprint handler for a specific code, app handler for a specific code,
blueprint handler for an exception class, app handler for an exception