mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
flask: Add types for cli_group argument to flask.Blueprint (#4011)
* Add types for cli_group argument to flask.Blueprint * Use private _Sentinel type for default argument to Blueprint cli_group
This commit is contained in:
5
third_party/2and3/flask/blueprints.pyi
vendored
5
third_party/2and3/flask/blueprints.pyi
vendored
@@ -9,6 +9,8 @@ from typing import Any, Callable, Optional, Type, TypeVar, Union
|
||||
_T = TypeVar('_T')
|
||||
_VT = TypeVar('_VT', bound=_ViewFunc)
|
||||
|
||||
class _Sentinel(object): ...
|
||||
|
||||
class BlueprintSetupState:
|
||||
app: Any = ...
|
||||
blueprint: Any = ...
|
||||
@@ -34,7 +36,8 @@ class Blueprint(_PackageBoundObject):
|
||||
static_url_path: Optional[str] = ...
|
||||
deferred_functions: Any = ...
|
||||
url_values_defaults: Any = ...
|
||||
def __init__(self, name: str, import_name: str, static_folder: Optional[str] = ..., static_url_path: Optional[str] = ..., template_folder: Optional[str] = ..., url_prefix: Optional[str] = ..., subdomain: Optional[str] = ..., url_defaults: Optional[Any] = ..., root_path: Optional[str] = ...) -> None: ...
|
||||
cli_group: Union[Optional[str], _Sentinel] = ...
|
||||
def __init__(self, name: str, import_name: str, static_folder: Optional[str] = ..., static_url_path: Optional[str] = ..., template_folder: Optional[str] = ..., url_prefix: Optional[str] = ..., subdomain: Optional[str] = ..., url_defaults: Optional[Any] = ..., root_path: Optional[str] = ..., cli_group: Union[Optional[str], _Sentinel] = ...) -> None: ...
|
||||
def record(self, func: Any) -> None: ...
|
||||
def record_once(self, func: Any): ...
|
||||
def make_setup_state(self, app: Any, options: Any, first_registration: bool = ...): ...
|
||||
|
||||
Reference in New Issue
Block a user