@@ -323,9 +323,9 @@ def load_app(self) -> Flask:
323
323
"""
324
324
if self ._loaded_app is not None :
325
325
return self ._loaded_app
326
-
326
+ app : Flask | None = None
327
327
if self .create_app is not None :
328
- app : Flask | None = self .create_app ()
328
+ app = self .create_app ()
329
329
else :
330
330
if self .app_import_path :
331
331
path , name = (
@@ -549,7 +549,7 @@ def __init__(
549
549
set_debug_flag : bool = True ,
550
550
** extra : t .Any ,
551
551
) -> None :
552
- params = list (extra .pop ("params" , None ) or ())
552
+ params : list [ click . Parameter ] = list (extra .pop ("params" , None ) or ())
553
553
# Processing is done with option callbacks instead of a group
554
554
# callback. This allows users to make a custom group callback
555
555
# without losing the behavior. --env-file must come first so
@@ -587,7 +587,7 @@ def _load_plugin_commands(self) -> None:
587
587
# Use a backport on Python < 3.10. We technically have
588
588
# importlib.metadata on 3.8+, but the API changed in 3.10,
589
589
# so use the backport for consistency.
590
- import importlib_metadata as metadata
590
+ import importlib_metadata as metadata # pyright: ignore
591
591
592
592
for ep in metadata .entry_points (group = "flask.commands" ):
593
593
self .add_command (ep .load (), ep .name )
@@ -934,7 +934,7 @@ def run_command(
934
934
option.
935
935
"""
936
936
try :
937
- app : WSGIApplication = info .load_app ()
937
+ app : WSGIApplication = info .load_app () # pyright: ignore
938
938
except Exception as e :
939
939
if is_running_from_reloader ():
940
940
# When reloading, print out the error immediately, but raise
0 commit comments