Preserve CLI cert type checking
This commit is contained in:
parent
4e584a238b
commit
193a049b96
1 changed files with 5 additions and 1 deletions
|
|
@ -33,6 +33,10 @@ if t.TYPE_CHECKING:
|
|||
|
||||
from .app import Flask
|
||||
|
||||
_CertParamTypeBase = click.ParamType[str | os.PathLike[str] | ssl.SSLContext]
|
||||
else:
|
||||
_CertParamTypeBase = click.ParamType
|
||||
|
||||
|
||||
class NoAppException(click.UsageError):
|
||||
"""Raised if an application cannot be found or loaded."""
|
||||
|
|
@ -777,7 +781,7 @@ def show_server_banner(debug: bool, app_import_path: str | None) -> None:
|
|||
click.echo(f" * Debug mode: {'on' if debug else 'off'}")
|
||||
|
||||
|
||||
class CertParamType(click.ParamType):
|
||||
class CertParamType(_CertParamTypeBase):
|
||||
"""Click option type for the ``--cert`` option. Allows either an
|
||||
existing file, the string ``'adhoc'``, or an import for a
|
||||
:class:`~ssl.SSLContext` object.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue