Update stubs

This commit is contained in:
Trinh Anh Ngoc
2024-04-22 16:07:53 +07:00
parent 42ade189db
commit f18a79873e
2 changed files with 4 additions and 0 deletions

View File

@@ -40,12 +40,14 @@ SESSION_LIFETIME: int
STATIC_CACHE: int
STATIC_CACHE_LONG: int
class RegistryError(RuntimeError): ...
class SessionExpiredException(Exception): ...
def content_disposition(filename: str) -> str: ...
def db_list(force: bool = ..., host: str | None = ...) -> list[str]: ...
def db_filter(dbs: Iterable[str], host: str | None = ...) -> list[str]: ...
def dispatch_rpc(service_name: str, method: str, params: Mapping): ...
def get_session_max_inactivity(env: Environment) -> int: ...
def is_cors_preflight(request: Request, endpoint) -> bool: ...
def serialize_exception(exception: Exception): ...
def send_file(
@@ -283,6 +285,7 @@ class Request:
def render(
self, template: str, qcontext: dict | None = ..., lazy: bool = ..., **kw
): ...
def reroute(self, path, query_string: str | None = ...) -> None: ...
class Dispatcher(ABC):
routing_type: str

View File

@@ -36,6 +36,7 @@ class Registry(Mapping[str, type[BaseModel]]):
has_unaccent: bool
has_trigram: bool
unaccent: Callable[[Any], str]
unaccent_python: Callable[[Any], str]
def init(self, db_name: str) -> None: ...
@classmethod
def delete(cls, db_name: str) -> None: ...