@@ -323,9 +323,9 @@ def load_app(self) -> Flask:
323323 """
324324 if self ._loaded_app is not None :
325325 return self ._loaded_app
326-
326+ app : Flask | None = None
327327 if self .create_app is not None :
328- app : Flask | None = self .create_app ()
328+ app = self .create_app ()
329329 else :
330330 if self .app_import_path :
331331 path , name = (
@@ -549,7 +549,7 @@ def __init__(
549549 set_debug_flag : bool = True ,
550550 ** extra : t .Any ,
551551 ) -> None :
552- params = list (extra .pop ("params" , None ) or ())
552+ params : list [ click . Parameter ] = list (extra .pop ("params" , None ) or ())
553553 # Processing is done with option callbacks instead of a group
554554 # callback. This allows users to make a custom group callback
555555 # without losing the behavior. --env-file must come first so
@@ -587,7 +587,7 @@ def _load_plugin_commands(self) -> None:
587587 # Use a backport on Python < 3.10. We technically have
588588 # importlib.metadata on 3.8+, but the API changed in 3.10,
589589 # so use the backport for consistency.
590- import importlib_metadata as metadata
590+ import importlib_metadata as metadata # pyright: ignore
591591
592592 for ep in metadata .entry_points (group = "flask.commands" ):
593593 self .add_command (ep .load (), ep .name )
@@ -934,7 +934,7 @@ def run_command(
934934 option.
935935 """
936936 try :
937- app : WSGIApplication = info .load_app ()
937+ app : WSGIApplication = info .load_app () # pyright: ignore
938938 except Exception as e :
939939 if is_running_from_reloader ():
940940 # When reloading, print out the error immediately, but raise
0 commit comments