Skip to content

Commit 949378f

Browse files
authored
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
1 parent 1f7023b commit 949378f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

third_party/2and3/flask/blueprints.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ from typing import Any, Callable, Optional, Type, TypeVar, Union
99
_T = TypeVar('_T')
1010
_VT = TypeVar('_VT', bound=_ViewFunc)
1111

12+
class _Sentinel(object): ...
13+
1214
class BlueprintSetupState:
1315
app: Any = ...
1416
blueprint: Any = ...
@@ -34,7 +36,8 @@ class Blueprint(_PackageBoundObject):
3436
static_url_path: Optional[str] = ...
3537
deferred_functions: Any = ...
3638
url_values_defaults: Any = ...
37-
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: ...
39+
cli_group: Union[Optional[str], _Sentinel] = ...
40+
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: ...
3841
def record(self, func: Any) -> None: ...
3942
def record_once(self, func: Any): ...
4043
def make_setup_state(self, app: Any, options: Any, first_registration: bool = ...): ...

0 commit comments

Comments
 (0)