Re-organize directory structure (#4971)

See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
Ivan Levkivskyi
2021-01-27 12:00:39 +00:00
committed by GitHub
co-authored by Ivan Levkivskyi
parent 869238e587
commit 16ae4c6120
1399 changed files with 601 additions and 97 deletions
+3
View File
@@ -0,0 +1,3 @@
version = "0.1"
python2 = true
requires = ["types-python-dateutil"]
@@ -0,0 +1,47 @@
import datetime
from typing import Iterable, Optional, Union
from dateutil.relativedelta import relativedelta
class DateTimeRange(object):
NOT_A_TIME_STR: str
start_time_format: str
end_time_format: str
is_output_elapse: bool
separator: str
def __init__(
self,
start_datetime: Optional[Union[datetime.datetime, str]] = ...,
end_datetime: Optional[Union[datetime.datetime, str]] = ...,
start_time_format: str = ...,
end_time_format: str = ...,
) -> None: ...
def __eq__(self, other) -> bool: ...
def __ne__(self, other) -> bool: ...
def __add__(self, other) -> DateTimeRange: ...
def __iadd__(self, other) -> DateTimeRange: ...
def __sub__(self, other) -> DateTimeRange: ...
def __isub__(self, other) -> DateTimeRange: ...
def __contains__(self, x) -> bool: ...
@property
def start_datetime(self) -> datetime.datetime: ...
@property
def end_datetime(self) -> datetime.datetime: ...
@property
def timedelta(self) -> datetime.timedelta: ...
def is_set(self) -> bool: ...
def validate_time_inversion(self) -> None: ...
def is_valid_timerange(self) -> bool: ...
def is_intersection(self, x) -> bool: ...
def get_start_time_str(self) -> str: ...
def get_end_time_str(self) -> str: ...
def get_timedelta_second(self) -> float: ...
def set_start_datetime(self, value: Optional[Union[datetime.datetime, str]], timezone: Optional[str] = ...) -> None: ...
def set_end_datetime(self, value: Optional[Union[datetime.datetime, str]], timezone: Optional[str] = ...) -> None: ...
def set_time_range(
self, start: Optional[Union[datetime.datetime, str]], end: Optional[Union[datetime.datetime, str]]
) -> None: ...
def range(self, step: Union[datetime.timedelta, relativedelta]) -> Iterable[datetime.datetime]: ...
def intersection(self, x: DateTimeRange) -> DateTimeRange: ...
def encompass(self, x: DateTimeRange) -> DateTimeRange: ...
def truncate(self, percentage: float) -> None: ...
+3
View File
@@ -0,0 +1,3 @@
version = "0.1"
python2 = true
requires = ["types-typing-extensions"]
+1
View File
@@ -0,0 +1 @@
from .classic import deprecated as deprecated
+21
View File
@@ -0,0 +1,21 @@
from typing import Any, Callable, Optional, Type, TypeVar, overload
_F = TypeVar("_F", bound=Callable[..., Any])
class ClassicAdapter:
reason: str
version: str
action: Optional[str]
category: Type[DeprecationWarning]
def __init__(
self, reason: str = ..., version: str = ..., action: Optional[str] = ..., category: Type[DeprecationWarning] = ...
) -> None: ...
def get_deprecated_msg(self, wrapped: Callable[..., Any], instance: object) -> str: ...
def __call__(self, wrapped: _F) -> Callable[[_F], _F]: ...
@overload
def deprecated(__wrapped: _F) -> _F: ...
@overload
def deprecated(
reason: str = ..., *, version: str = ..., action: Optional[str] = ..., category: Optional[Type[DeprecationWarning]] = ...
) -> Callable[[_F], _F]: ...
+31
View File
@@ -0,0 +1,31 @@
from typing import Any, Callable, Optional, Type, TypeVar, overload
from typing_extensions import Literal
from .classic import ClassicAdapter
_F = TypeVar("_F", bound=Callable[..., Any])
class SphinxAdapter(ClassicAdapter):
directive: Literal["versionadded", "versionchanged", "deprecated"]
reason: str
version: str
action: Optional[str]
category: Type[DeprecationWarning]
def __init__(
self,
directive: Literal["versionadded", "versionchanged", "deprecated"],
reason: str = ...,
version: str = ...,
action: Optional[str] = ...,
category: Type[DeprecationWarning] = ...,
) -> None: ...
def __call__(self, wrapped: _F) -> Callable[[_F], _F]: ...
def versionadded(reason: str = ..., version: str = ...) -> Callable[[_F], _F]: ...
def versionchanged(reason: str = ..., version: str = ...) -> Callable[[_F], _F]: ...
@overload
def deprecated(__wrapped: _F) -> _F: ...
@overload
def deprecated(
reason: str = ..., *, version: str = ..., action: Optional[str] = ..., category: Optional[Type[DeprecationWarning]] = ...
) -> Callable[[_F], _F]: ...
+3
View File
@@ -0,0 +1,3 @@
version = "0.1"
python2 = true
requires = ["types-Jinja2", "types-Werkzeug", "types-click"]
+41
View File
@@ -0,0 +1,41 @@
from jinja2 import Markup as Markup, escape as escape
from werkzeug.exceptions import abort as abort
from werkzeug.utils import redirect as redirect
from .app import Flask as Flask
from .blueprints import Blueprint as Blueprint
from .config import Config as Config
from .ctx import (
after_this_request as after_this_request,
copy_current_request_context as copy_current_request_context,
has_app_context as has_app_context,
has_request_context as has_request_context,
)
from .globals import current_app as current_app, g as g, request as request, session as session
from .helpers import (
flash as flash,
get_flashed_messages as get_flashed_messages,
get_template_attribute as get_template_attribute,
make_response as make_response,
safe_join as safe_join,
send_file as send_file,
send_from_directory as send_from_directory,
stream_with_context as stream_with_context,
url_for as url_for,
)
from .json import jsonify as jsonify
from .signals import (
appcontext_popped as appcontext_popped,
appcontext_pushed as appcontext_pushed,
appcontext_tearing_down as appcontext_tearing_down,
before_render_template as before_render_template,
got_request_exception as got_request_exception,
message_flashed as message_flashed,
request_finished as request_finished,
request_started as request_started,
request_tearing_down as request_tearing_down,
signals_available as signals_available,
template_rendered as template_rendered,
)
from .templating import render_template as render_template, render_template_string as render_template_string
from .wrappers import Request as Request, Response as Response
+195
View File
@@ -0,0 +1,195 @@
from datetime import timedelta
from types import TracebackType
from typing import (
Any,
ByteString,
Callable,
ContextManager,
Dict,
Iterable,
List,
NoReturn,
Optional,
Text,
Tuple,
Type,
TypeVar,
Union,
)
from .blueprints import Blueprint
from .config import Config
from .ctx import AppContext, RequestContext
from .helpers import _PackageBoundObject
from .testing import FlaskClient
from .wrappers import Response
def setupmethod(f: Any): ...
_T = TypeVar("_T")
_ExcInfo = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]]
_StartResponse = Callable[[str, List[Tuple[str, str]], Optional[_ExcInfo]], Callable[[bytes], Any]]
_WSGICallable = Callable[[Dict[Text, Any], _StartResponse], Iterable[bytes]]
_Status = Union[str, int]
_Headers = Union[Dict[Any, Any], List[Tuple[Any, Any]]]
_Body = Union[Text, ByteString, Dict[Text, Any], Response, _WSGICallable]
_ViewFuncReturnType = Union[_Body, Tuple[_Body, _Status, _Headers], Tuple[_Body, _Status], Tuple[_Body, _Headers]]
_ViewFunc = Union[Callable[..., NoReturn], Callable[..., _ViewFuncReturnType]]
_VT = TypeVar("_VT", bound=_ViewFunc)
class Flask(_PackageBoundObject):
request_class: type = ...
response_class: type = ...
jinja_environment: type = ...
app_ctx_globals_class: type = ...
config_class: Type[Config] = ...
testing: Any = ...
secret_key: Union[Text, bytes, None] = ...
session_cookie_name: Any = ...
permanent_session_lifetime: timedelta = ...
send_file_max_age_default: timedelta = ...
use_x_sendfile: Any = ...
json_encoder: Any = ...
json_decoder: Any = ...
jinja_options: Any = ...
default_config: Any = ...
url_rule_class: type = ...
test_client_class: type = ...
test_cli_runner_class: type = ...
session_interface: Any = ...
import_name: str = ...
template_folder: str = ...
root_path: Union[str, Text] = ...
static_url_path: Any = ...
static_folder: Optional[str] = ...
instance_path: Union[str, Text] = ...
config: Config = ...
view_functions: Any = ...
error_handler_spec: Any = ...
url_build_error_handlers: Any = ...
before_request_funcs: Dict[Optional[str], List[Callable[[], Any]]] = ...
before_first_request_funcs: List[Callable[[], None]] = ...
after_request_funcs: Dict[Optional[str], List[Callable[[Response], Response]]] = ...
teardown_request_funcs: Dict[Optional[str], List[Callable[[Optional[Exception]], Any]]] = ...
teardown_appcontext_funcs: List[Callable[[Optional[Exception]], Any]] = ...
url_value_preprocessors: Any = ...
url_default_functions: Any = ...
template_context_processors: Any = ...
shell_context_processors: Any = ...
blueprints: Any = ...
extensions: Any = ...
url_map: Any = ...
subdomain_matching: Any = ...
cli: Any = ...
def __init__(
self,
import_name: str,
static_url_path: Optional[str] = ...,
static_folder: Optional[str] = ...,
static_host: Optional[str] = ...,
host_matching: bool = ...,
subdomain_matching: bool = ...,
template_folder: str = ...,
instance_path: Optional[str] = ...,
instance_relative_config: bool = ...,
root_path: Optional[str] = ...,
) -> None: ...
@property
def name(self) -> str: ...
@property
def propagate_exceptions(self) -> bool: ...
@property
def preserve_context_on_exception(self): ...
@property
def logger(self): ...
@property
def jinja_env(self): ...
@property
def got_first_request(self) -> bool: ...
def make_config(self, instance_relative: bool = ...): ...
def auto_find_instance_path(self): ...
def open_instance_resource(self, resource: Union[str, Text], mode: str = ...): ...
templates_auto_reload: Any = ...
def create_jinja_environment(self): ...
def create_global_jinja_loader(self): ...
def select_jinja_autoescape(self, filename: Any): ...
def update_template_context(self, context: Any) -> None: ...
def make_shell_context(self): ...
env: Optional[str] = ...
debug: bool = ...
def run(
self,
host: Optional[str] = ...,
port: Optional[Union[int, str]] = ...,
debug: Optional[bool] = ...,
load_dotenv: bool = ...,
**options: Any,
) -> None: ...
def test_client(self, use_cookies: bool = ..., **kwargs: Any) -> FlaskClient[Response]: ...
def test_cli_runner(self, **kwargs: Any): ...
def open_session(self, request: Any): ...
def save_session(self, session: Any, response: Any): ...
def make_null_session(self): ...
def register_blueprint(self, blueprint: Blueprint, **options: Any) -> None: ...
def iter_blueprints(self): ...
def add_url_rule(
self,
rule: str,
endpoint: Optional[str] = ...,
view_func: _ViewFunc = ...,
provide_automatic_options: Optional[bool] = ...,
**options: Any,
) -> None: ...
def route(self, rule: str, **options: Any) -> Callable[[_VT], _VT]: ...
def endpoint(self, endpoint: str) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
def errorhandler(
self, code_or_exception: Union[int, Type[Exception]]
) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
def register_error_handler(self, code_or_exception: Union[int, Type[Exception]], f: Callable[..., Any]) -> None: ...
def template_filter(self, name: Optional[Any] = ...): ...
def add_template_filter(self, f: Any, name: Optional[Any] = ...) -> None: ...
def template_test(self, name: Optional[Any] = ...): ...
def add_template_test(self, f: Any, name: Optional[Any] = ...) -> None: ...
def template_global(self, name: Optional[Any] = ...): ...
def add_template_global(self, f: Any, name: Optional[Any] = ...) -> None: ...
def before_request(self, f: Callable[[], _T]) -> Callable[[], _T]: ...
def before_first_request(self, f: Callable[[], _T]) -> Callable[[], _T]: ...
def after_request(self, f: Callable[[Response], Response]) -> Callable[[Response], Response]: ...
def teardown_request(self, f: Callable[[Optional[Exception]], _T]) -> Callable[[Optional[Exception]], _T]: ...
def teardown_appcontext(self, f: Callable[[Optional[Exception]], _T]) -> Callable[[Optional[Exception]], _T]: ...
def context_processor(self, f: Any): ...
def shell_context_processor(self, f: Any): ...
def url_value_preprocessor(self, f: Any): ...
def url_defaults(self, f: Any): ...
def handle_http_exception(self, e: Any): ...
def trap_http_exception(self, e: Any): ...
def handle_user_exception(self, e: Any): ...
def handle_exception(self, e: Any): ...
def log_exception(self, exc_info: Any) -> None: ...
def raise_routing_exception(self, request: Any) -> None: ...
def dispatch_request(self): ...
def full_dispatch_request(self): ...
def finalize_request(self, rv: Any, from_error_handler: bool = ...): ...
def try_trigger_before_first_request_functions(self): ...
def make_default_options_response(self): ...
def should_ignore_error(self, error: Any): ...
def make_response(self, rv: Any): ...
def create_url_adapter(self, request: Any): ...
def inject_url_defaults(self, endpoint: Any, values: Any) -> None: ...
def handle_url_build_error(self, error: Any, endpoint: Any, values: Any): ...
def preprocess_request(self): ...
def process_response(self, response: Any): ...
def do_teardown_request(self, exc: Any = ...) -> None: ...
def do_teardown_appcontext(self, exc: Any = ...) -> None: ...
def app_context(self) -> AppContext: ...
def request_context(self, environ: Any): ...
def test_request_context(self, *args: Any, **kwargs: Any) -> ContextManager[RequestContext]: ...
def wsgi_app(self, environ: Any, start_response: Any): ...
def __call__(self, environ: Any, start_response: Any): ...
# These are not preset at runtime but we add them since monkeypatching this
# class is quite common.
def __setattr__(self, name: str, value: Any): ...
def __getattr__(self, name: str): ...
+80
View File
@@ -0,0 +1,80 @@
from typing import Any, Callable, Optional, Type, TypeVar, Union
from .app import _ViewFunc
from .helpers import _PackageBoundObject
_T = TypeVar("_T")
_VT = TypeVar("_VT", bound=_ViewFunc)
class _Sentinel(object): ...
class BlueprintSetupState:
app: Any = ...
blueprint: Any = ...
options: Any = ...
first_registration: Any = ...
subdomain: Any = ...
url_prefix: Any = ...
url_defaults: Any = ...
def __init__(self, blueprint: Any, app: Any, options: Any, first_registration: Any) -> None: ...
def add_url_rule(self, rule: str, endpoint: Optional[str] = ..., view_func: _ViewFunc = ..., **options: Any) -> None: ...
class Blueprint(_PackageBoundObject):
warn_on_modifications: bool = ...
json_encoder: Any = ...
json_decoder: Any = ...
import_name: str = ...
template_folder: Optional[str] = ...
root_path: str = ...
name: str = ...
url_prefix: Optional[str] = ...
subdomain: Optional[str] = ...
static_folder: Optional[str] = ...
static_url_path: Optional[str] = ...
deferred_functions: Any = ...
url_values_defaults: Any = ...
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 = ...): ...
def register(self, app: Any, options: Any, first_registration: bool = ...) -> None: ...
def route(self, rule: str, **options: Any) -> Callable[[_VT], _VT]: ...
def add_url_rule(self, rule: str, endpoint: Optional[str] = ..., view_func: _ViewFunc = ..., **options: Any) -> None: ...
def endpoint(self, endpoint: str) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
def app_template_filter(self, name: Optional[Any] = ...): ...
def add_app_template_filter(self, f: Any, name: Optional[Any] = ...) -> None: ...
def app_template_test(self, name: Optional[Any] = ...): ...
def add_app_template_test(self, f: Any, name: Optional[Any] = ...) -> None: ...
def app_template_global(self, name: Optional[Any] = ...): ...
def add_app_template_global(self, f: Any, name: Optional[Any] = ...) -> None: ...
def before_request(self, f: Any): ...
def before_app_request(self, f: Any): ...
def before_app_first_request(self, f: Any): ...
def after_request(self, f: Any): ...
def after_app_request(self, f: Any): ...
def teardown_request(self, f: Any): ...
def teardown_app_request(self, f: Any): ...
def context_processor(self, f: Any): ...
def app_context_processor(self, f: Any): ...
def app_errorhandler(self, code: Any): ...
def url_value_preprocessor(self, f: Any): ...
def url_defaults(self, f: Any): ...
def app_url_value_preprocessor(self, f: Any): ...
def app_url_defaults(self, f: Any): ...
def errorhandler(
self, code_or_exception: Union[int, Type[Exception]]
) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
def register_error_handler(self, code_or_exception: Union[int, Type[Exception]], f: Callable[..., Any]) -> None: ...
+68
View File
@@ -0,0 +1,68 @@
from typing import Any, Optional
import click
class NoAppException(click.UsageError): ...
def find_best_app(script_info: Any, module: Any): ...
def call_factory(script_info: Any, app_factory: Any, arguments: Any = ...): ...
def find_app_by_string(script_info: Any, module: Any, app_name: Any): ...
def prepare_import(path: Any): ...
def locate_app(script_info: Any, module_name: Any, app_name: Any, raise_if_not_found: bool = ...): ...
def get_version(ctx: Any, param: Any, value: Any): ...
version_option: Any
class DispatchingApp:
loader: Any = ...
def __init__(self, loader: Any, use_eager_loading: bool = ...) -> None: ...
def __call__(self, environ: Any, start_response: Any): ...
class ScriptInfo:
app_import_path: Any = ...
create_app: Any = ...
data: Any = ...
def __init__(self, app_import_path: Optional[Any] = ..., create_app: Optional[Any] = ...) -> None: ...
def load_app(self): ...
pass_script_info: Any
def with_appcontext(f: Any): ...
class AppGroup(click.Group):
def command(self, *args: Any, **kwargs: Any): ...
def group(self, *args: Any, **kwargs: Any): ...
class FlaskGroup(AppGroup):
create_app: Any = ...
load_dotenv: Any = ...
def __init__(
self,
add_default_commands: bool = ...,
create_app: Optional[Any] = ...,
add_version_option: bool = ...,
load_dotenv: bool = ...,
**extra: Any,
) -> None: ...
def get_command(self, ctx: Any, name: Any): ...
def list_commands(self, ctx: Any): ...
def main(self, *args: Any, **kwargs: Any): ...
def load_dotenv(path: Optional[Any] = ...): ...
def show_server_banner(env: Any, debug: Any, app_import_path: Any, eager_loading: Any): ...
class CertParamType(click.ParamType):
name: str = ...
path_type: Any = ...
def __init__(self) -> None: ...
def convert(self, value: Any, param: Any, ctx: Any): ...
def run_command(
info: Any, host: Any, port: Any, reload: Any, debugger: Any, eager_loading: Any, with_threads: Any, cert: Any
) -> None: ...
def shell_command() -> None: ...
def routes_command(sort: Any, all_methods: Any): ...
cli: Any
def main(as_module: bool = ...) -> None: ...
+18
View File
@@ -0,0 +1,18 @@
from typing import Any, Dict, Optional
class ConfigAttribute:
__name__: Any = ...
get_converter: Any = ...
def __init__(self, name: Any, get_converter: Optional[Any] = ...) -> None: ...
def __get__(self, obj: Any, type: Optional[Any] = ...): ...
def __set__(self, obj: Any, value: Any) -> None: ...
class Config(Dict[str, Any]):
root_path: Any = ...
def __init__(self, root_path: Any, defaults: Optional[Any] = ...) -> None: ...
def from_envvar(self, variable_name: Any, silent: bool = ...): ...
def from_pyfile(self, filename: Any, silent: bool = ...): ...
def from_object(self, obj: Any) -> None: ...
def from_json(self, filename: Any, silent: bool = ...): ...
def from_mapping(self, *mapping: Any, **kwargs: Any): ...
def get_namespace(self, namespace: Any, lowercase: bool = ..., trim_namespace: bool = ...): ...
+40
View File
@@ -0,0 +1,40 @@
from typing import Any, Optional
class _AppCtxGlobals:
def get(self, name: Any, default: Optional[Any] = ...): ...
def pop(self, name: Any, default: Any = ...): ...
def setdefault(self, name: Any, default: Optional[Any] = ...): ...
def __contains__(self, item: Any): ...
def __iter__(self): ...
def after_this_request(f: Any): ...
def copy_current_request_context(f: Any): ...
def has_request_context(): ...
def has_app_context(): ...
class AppContext:
app: Any = ...
url_adapter: Any = ...
g: Any = ...
def __init__(self, app: Any) -> None: ...
def push(self) -> None: ...
def pop(self, exc: Any = ...) -> None: ...
def __enter__(self): ...
def __exit__(self, exc_type: Any, exc_value: Any, tb: Any) -> None: ...
class RequestContext:
app: Any = ...
request: Any = ...
url_adapter: Any = ...
flashes: Any = ...
session: Any = ...
preserved: bool = ...
def __init__(self, app: Any, environ: Any, request: Optional[Any] = ...) -> None: ...
g: Any = ...
def copy(self): ...
def match_request(self) -> None: ...
def push(self) -> None: ...
def pop(self, exc: Any = ...) -> None: ...
def auto_pop(self, exc: Any) -> None: ...
def __enter__(self): ...
def __exit__(self, exc_type: Any, exc_value: Any, tb: Any) -> None: ...
+14
View File
@@ -0,0 +1,14 @@
from typing import Any
class UnexpectedUnicodeError(AssertionError, UnicodeError): ...
class DebugFilesKeyError(KeyError, AssertionError):
msg: Any = ...
def __init__(self, request: Any, key: Any) -> None: ...
class FormDataRoutingRedirect(AssertionError):
def __init__(self, request: Any) -> None: ...
def attach_enctype_error_multidict(request: Any): ...
def explain_template_loading_attempts(app: Any, template: Any, attempts: Any) -> None: ...
def explain_ignored_app_run() -> None: ...
+16
View File
@@ -0,0 +1,16 @@
from typing import Any
from werkzeug.local import LocalStack
from .app import Flask
from .wrappers import Request
class _FlaskLocalProxy(Flask):
def _get_current_object(self) -> Flask: ...
_request_ctx_stack: LocalStack
_app_ctx_stack: LocalStack
current_app: _FlaskLocalProxy
request: Request
session: Any
g: Any
+55
View File
@@ -0,0 +1,55 @@
from typing import Any, Optional
from .cli import AppGroup
from .wrappers import Response
def get_env(): ...
def get_debug_flag(): ...
def get_load_dotenv(default: bool = ...): ...
def stream_with_context(generator_or_function: Any): ...
def make_response(*args: Any) -> Response: ...
def url_for(endpoint: str, **values: Any) -> str: ...
def get_template_attribute(template_name: Any, attribute: Any): ...
def flash(message: Any, category: str = ...) -> None: ...
def get_flashed_messages(with_categories: bool = ..., category_filter: Any = ...): ...
def send_file(
filename_or_fp: Any,
mimetype: Optional[Any] = ...,
as_attachment: bool = ...,
attachment_filename: Optional[Any] = ...,
add_etags: bool = ...,
cache_timeout: Optional[Any] = ...,
conditional: bool = ...,
last_modified: Optional[Any] = ...,
) -> Response: ...
def safe_join(directory: Any, *pathnames: Any): ...
def send_from_directory(directory: Any, filename: Any, **options: Any) -> Response: ...
def get_root_path(import_name: Any): ...
def find_package(import_name: Any): ...
class locked_cached_property:
__name__: Any = ...
__module__: Any = ...
__doc__: Any = ...
func: Any = ...
lock: Any = ...
def __init__(self, func: Any, name: Optional[Any] = ..., doc: Optional[Any] = ...) -> None: ...
def __get__(self, obj: Any, type: Optional[Any] = ...): ...
class _PackageBoundObject:
import_name: Any = ...
template_folder: Any = ...
root_path: Any = ...
cli: AppGroup = ...
def __init__(self, import_name: Any, template_folder: Optional[Any] = ..., root_path: Optional[Any] = ...) -> None: ...
static_folder: Any = ...
static_url_path: Any = ...
@property
def has_static_folder(self): ...
def jinja_loader(self): ...
def get_send_file_max_age(self, filename: Any): ...
def send_static_file(self, filename: Any) -> Response: ...
def open_resource(self, resource: Any, mode: str = ...): ...
def total_seconds(td: Any): ...
def is_ip(value: Any): ...
+19
View File
@@ -0,0 +1,19 @@
import json as _json
from typing import Any
from jinja2 import Markup
class JSONEncoder(_json.JSONEncoder):
def default(self, o: Any): ...
class JSONDecoder(_json.JSONDecoder): ...
def detect_encoding(data: bytes) -> str: ... # undocumented
def dumps(obj: Any, **kwargs: Any): ...
def dump(obj: Any, fp: Any, **kwargs: Any) -> None: ...
def loads(s: Any, **kwargs: Any): ...
def load(fp: Any, **kwargs: Any): ...
def htmlsafe_dumps(obj: Any, **kwargs: Any): ...
def htmlsafe_dump(obj: Any, fp: Any, **kwargs: Any) -> None: ...
def jsonify(*args: Any, **kwargs: Any): ...
def tojson_filter(obj: Any, **kwargs: Any) -> Markup: ... # undocumented
+67
View File
@@ -0,0 +1,67 @@
from typing import Any, Optional
class JSONTag:
key: Any = ...
serializer: Any = ...
def __init__(self, serializer: Any) -> None: ...
def check(self, value: Any) -> None: ...
def to_json(self, value: Any) -> None: ...
def to_python(self, value: Any) -> None: ...
def tag(self, value: Any): ...
class TagDict(JSONTag):
key: str = ...
def check(self, value: Any): ...
def to_json(self, value: Any): ...
def to_python(self, value: Any): ...
class PassDict(JSONTag):
def check(self, value: Any): ...
def to_json(self, value: Any): ...
tag: Any = ...
class TagTuple(JSONTag):
key: str = ...
def check(self, value: Any): ...
def to_json(self, value: Any): ...
def to_python(self, value: Any): ...
class PassList(JSONTag):
def check(self, value: Any): ...
def to_json(self, value: Any): ...
tag: Any = ...
class TagBytes(JSONTag):
key: str = ...
def check(self, value: Any): ...
def to_json(self, value: Any): ...
def to_python(self, value: Any): ...
class TagMarkup(JSONTag):
key: str = ...
def check(self, value: Any): ...
def to_json(self, value: Any): ...
def to_python(self, value: Any): ...
class TagUUID(JSONTag):
key: str = ...
def check(self, value: Any): ...
def to_json(self, value: Any): ...
def to_python(self, value: Any): ...
class TagDateTime(JSONTag):
key: str = ...
def check(self, value: Any): ...
def to_json(self, value: Any): ...
def to_python(self, value: Any): ...
class TaggedJSONSerializer:
default_tags: Any = ...
tags: Any = ...
order: Any = ...
def __init__(self) -> None: ...
def register(self, tag_class: Any, force: bool = ..., index: Optional[Any] = ...) -> None: ...
def tag(self, value: Any): ...
def untag(self, value: Any): ...
def dumps(self, value: Any): ...
def loads(self, value: Any): ...
+8
View File
@@ -0,0 +1,8 @@
from typing import Any
def wsgi_errors_stream(): ...
def has_level_handler(logger: Any): ...
default_handler: Any
def create_logger(app: Any): ...
+57
View File
@@ -0,0 +1,57 @@
from abc import ABCMeta
from typing import Any, MutableMapping, Optional
from werkzeug.datastructures import CallbackDict
class SessionMixin(MutableMapping[str, Any], metaclass=ABCMeta):
@property
def permanent(self): ...
@permanent.setter
def permanent(self, value: Any) -> None: ...
new: bool = ...
modified: bool = ...
accessed: bool = ...
class SecureCookieSession(CallbackDict[str, Any], SessionMixin):
modified: bool = ...
accessed: bool = ...
def __init__(self, initial: Optional[Any] = ...) -> None: ...
def __getitem__(self, key: Any): ...
def get(self, key: Any, default: Optional[Any] = ...): ...
def setdefault(self, key: Any, default: Optional[Any] = ...): ...
class NullSession(SecureCookieSession):
__setitem__: Any = ...
__delitem__: Any = ...
clear: Any = ...
pop: Any = ...
popitem: Any = ...
update: Any = ...
setdefault: Any = ...
class SessionInterface:
null_session_class: Any = ...
pickle_based: bool = ...
def make_null_session(self, app: Any): ...
def is_null_session(self, obj: Any): ...
def get_cookie_domain(self, app: Any): ...
def get_cookie_path(self, app: Any): ...
def get_cookie_httponly(self, app: Any): ...
def get_cookie_secure(self, app: Any): ...
def get_cookie_samesite(self, app: Any): ...
def get_expiration_time(self, app: Any, session: Any): ...
def should_set_cookie(self, app: Any, session: Any): ...
def open_session(self, app: Any, request: Any) -> None: ...
def save_session(self, app: Any, session: Any, response: Any) -> None: ...
session_json_serializer: Any
class SecureCookieSessionInterface(SessionInterface):
salt: str = ...
digest_method: Any = ...
key_derivation: str = ...
serializer: Any = ...
session_class: Any = ...
def get_signing_serializer(self, app: Any): ...
def open_session(self, app: Any, request: Any): ...
def save_session(self, app: Any, session: Any, response: Any): ...
+29
View File
@@ -0,0 +1,29 @@
from typing import Any, Optional
signals_available: bool
class Namespace:
def signal(self, name: Any, doc: Optional[Any] = ...): ...
class _FakeSignal:
name: Any = ...
__doc__: Any = ...
def __init__(self, name: Any, doc: Optional[Any] = ...) -> None: ...
send: Any = ...
connect: Any = ...
disconnect: Any = ...
has_receivers_for: Any = ...
receivers_for: Any = ...
temporarily_connected_to: Any = ...
connected_to: Any = ...
template_rendered: Any
before_render_template: Any
request_started: Any
request_finished: Any
request_tearing_down: Any
got_request_exception: Any
appcontext_tearing_down: Any
appcontext_pushed: Any
appcontext_popped: Any
message_flashed: Any
+16
View File
@@ -0,0 +1,16 @@
from typing import Any, Iterable, Text, Union
from jinja2 import BaseLoader, Environment as BaseEnvironment
class Environment(BaseEnvironment):
app: Any = ...
def __init__(self, app: Any, **options: Any) -> None: ...
class DispatchingJinjaLoader(BaseLoader):
app: Any = ...
def __init__(self, app: Any) -> None: ...
def get_source(self, environment: Any, template: Any): ...
def list_templates(self): ...
def render_template(template_name_or_list: Union[Text, Iterable[Text]], **context: Any) -> Text: ...
def render_template_string(source: Text, **context: Any) -> Text: ...
+56
View File
@@ -0,0 +1,56 @@
from typing import IO, Any, Iterable, Mapping, Optional, Text, TypeVar, Union
from click import BaseCommand
from click.testing import CliRunner, Result
from werkzeug.test import Client, EnvironBuilder as WerkzeugEnvironBuilder
# Response type for the client below.
# By default _R is Tuple[Iterable[Any], Union[Text, int], werkzeug.datastructures.Headers], however
# most commonly it is wrapped in a Reponse object.
_R = TypeVar("_R")
class FlaskClient(Client[_R]):
preserve_context: bool = ...
environ_base: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def session_transaction(self, *args: Any, **kwargs: Any) -> None: ...
def __enter__(self): ...
def __exit__(self, exc_type: Any, exc_value: Any, tb: Any) -> None: ...
class FlaskCliRunner(CliRunner):
app: Any = ...
def __init__(self, app: Any, **kwargs: Any) -> None: ...
def invoke(
self,
cli: Optional[BaseCommand] = ...,
args: Optional[Union[str, Iterable[str]]] = ...,
input: Optional[Union[bytes, IO[Any], Text]] = ...,
env: Optional[Mapping[str, str]] = ...,
catch_exceptions: bool = ...,
color: bool = ...,
**extra: Any,
) -> Result: ...
class EnvironBuilder(WerkzeugEnvironBuilder):
app: Any
def __init__(
self,
app: Any,
path: str = ...,
base_url: Optional[Any] = ...,
subdomain: Optional[Any] = ...,
url_scheme: Optional[Any] = ...,
*args: Any,
**kwargs: Any,
) -> None: ...
def json_dumps(self, obj: Any, **kwargs: Any) -> str: ...
def make_test_environ_builder(
app: Any,
path: str = ...,
base_url: Optional[Any] = ...,
subdomain: Optional[Any] = ...,
url_scheme: Optional[Any] = ...,
*args: Any,
**kwargs: Any,
): ...
+17
View File
@@ -0,0 +1,17 @@
from typing import Any
http_method_funcs: Any
class View:
methods: Any = ...
provide_automatic_options: Any = ...
decorators: Any = ...
def dispatch_request(self, *args: Any, **kwargs: Any) -> Any: ...
@classmethod
def as_view(cls, name: Any, *class_args: Any, **class_kwargs: Any): ...
class MethodViewType(type):
def __init__(self, name: Any, bases: Any, d: Any) -> None: ...
class MethodView(View, metaclass=MethodViewType):
def dispatch_request(self, *args: Any, **kwargs: Any) -> Any: ...
+32
View File
@@ -0,0 +1,32 @@
from typing import Any, Dict, Optional
from werkzeug.exceptions import HTTPException
from werkzeug.routing import Rule
from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase
class JSONMixin:
@property
def is_json(self) -> bool: ...
@property
def json(self): ...
def get_json(self, force: bool = ..., silent: bool = ..., cache: bool = ...): ...
def on_json_loading_failed(self, e: Any) -> None: ...
class Request(RequestBase, JSONMixin):
url_rule: Optional[Rule] = ...
view_args: Dict[str, Any] = ...
routing_exception: Optional[HTTPException] = ...
# Request is making the max_content_length readonly, where it was not the
# case in its supertype.
# We would require something like https://github.com/python/typing/issues/241
@property
def max_content_length(self) -> Optional[int]: ... # type: ignore
@property
def endpoint(self) -> Optional[str]: ...
@property
def blueprint(self) -> Optional[str]: ...
class Response(ResponseBase, JSONMixin):
default_mimetype: Optional[str] = ...
@property
def max_cookie_size(self) -> int: ...
+1
View File
@@ -0,0 +1 @@
version = "0.1"
+286
View File
@@ -0,0 +1,286 @@
from typing import Any, Callable, Dict, Generator, Iterable, Iterator, List, Optional, Sequence, Tuple, Union, overload
_NDArray = Any # FIXME: no typings for numpy arrays
class _JackPositionT: ...
class _CBufferType:
@overload
def __getitem__(self, key: int) -> str: ...
@overload
def __getitem__(self, key: slice) -> bytes: ...
@overload
def __setitem__(self, key: int, val: str) -> None: ...
@overload
def __setitem__(self, key: slice, val: bytes) -> None: ...
def __len__(self) -> int: ...
def __bytes__(self) -> bytes: ...
STOPPED: int
ROLLING: int
STARTING: int
NETSTARTING: int
PROPERTY_CREATED: int
PROPERTY_CHANGED: int
PROPERTY_DELETED: int
POSITION_BBT: int
POSITION_TIMECODE: int
POSITION_BBT_FRAME_OFFSET: int
POSITION_AUDIO_VIDEO_RATIO: int
POSITION_VIDEO_FRAME_OFFSET: int
class JackError(Exception): ...
class JackErrorCode(JackError):
def __init__(self, message: str, code: int) -> None: ...
message: str = ...
code: int = ...
class JackOpenError(JackError):
def __init__(self, name: str, status: Status) -> None: ...
name: str = ...
status: Status = ...
class Client:
def __init__(
self,
name: str,
use_exact_name: bool = ...,
no_start_server: bool = ...,
servername: Optional[str] = ...,
session_id: Optional[str] = ...,
) -> None: ...
@property
def name(self) -> str: ...
@property
def uuid(self) -> str: ...
@property
def samplerate(self) -> int: ...
@property
def blocksize(self) -> int: ...
@blocksize.setter
def blocksize(self, blocksize: int) -> None: ...
@property
def status(self) -> Status: ...
@property
def realtime(self) -> bool: ...
@property
def frames_since_cycle_start(self) -> int: ...
@property
def frame_time(self) -> int: ...
@property
def last_frame_time(self) -> int: ...
@property
def inports(self) -> Ports: ...
@property
def outports(self) -> Ports: ...
@property
def midi_inports(self) -> Ports: ...
@property
def midi_outports(self) -> Ports: ...
def owns(self, port: Union[str, Port]) -> bool: ...
def activate(self) -> None: ...
def deactivate(self, ignore_errors: bool = ...) -> None: ...
def cpu_load(self) -> float: ...
def close(self, ignore_errors: bool = ...) -> None: ...
def connect(self, source: Union[str, Port], destination: Union[str, Port]) -> None: ...
def disconnect(self, source: Union[str, Port], destination: Union[str, Port]) -> None: ...
def transport_start(self) -> None: ...
def transport_stop(self) -> None: ...
@property
def transport_state(self) -> TransportState: ...
@property
def transport_frame(self) -> int: ...
@transport_frame.setter
def transport_frame(self, frame: int) -> None: ...
def transport_locate(self, frame: int) -> None: ...
def transport_query(self) -> Tuple[TransportState, Dict[str, Any]]: ...
def transport_query_struct(self) -> Tuple[TransportState, _JackPositionT]: ...
def transport_reposition_struct(self, position: _JackPositionT) -> None: ... # TODO
def set_sync_timeout(self, timeout: int) -> None: ...
def set_freewheel(self, onoff: bool) -> None: ...
def set_shutdown_callback(self, callback: Callable[[Status, str], None]) -> None: ...
def set_process_callback(self, callback: Callable[[int], None]) -> None: ...
def set_freewheel_callback(self, callback: Callable[[bool], None]) -> None: ...
def set_blocksize_callback(self, callback: Callable[[int], None]) -> None: ...
def set_samplerate_callback(self, callback: Callable[[int], None]) -> None: ...
def set_client_registration_callback(self, callback: Callable[[str, bool], None]) -> None: ...
def set_port_registration_callback(
self, callback: Optional[Callable[[Port, bool], None]] = ..., only_available: bool = ...
) -> None: ...
def set_port_connect_callback(
self, callback: Optional[Callable[[Port, Port, bool], None]] = ..., only_available: bool = ...
) -> None: ...
def set_port_rename_callback(
self, callback: Optional[Callable[[Port, str, str], None]] = ..., only_available: bool = ...
) -> None: ...
def set_graph_order_callback(self, callback: Callable[[], None]) -> None: ...
def set_xrun_callback(self, callback: Callable[[float], None]) -> None: ...
def set_sync_callback(self, callback: Optional[Callable[[int, _JackPositionT], None]]) -> None: ...
def release_timebase(self) -> None: ...
def set_timebase_callback(
self, callback: Optional[Callable[[int, int, _JackPositionT, bool], None]] = ..., conditional: bool = ...
) -> bool: ...
def set_property_change_callback(self, callback: Callable[[int, str, int], None]) -> None: ...
def get_uuid_for_client_name(self, name: str) -> str: ...
def get_client_name_by_uuid(self, uuid: str) -> str: ...
def get_port_by_name(self, name: str) -> Port: ...
def get_all_connections(self, port: Port) -> List[Port]: ...
def get_ports(
self,
name_pattern: str = ...,
is_audio: bool = ...,
is_midi: bool = ...,
is_input: bool = ...,
is_output: bool = ...,
is_physical: bool = ...,
can_monitor: bool = ...,
is_terminal: bool = ...,
) -> List[Port]: ...
def set_property(
self,
subject: Union[int, str],
key: str,
value: Union[str, bytes],
type: str = ...,
) -> None: ...
def remove_property(self, subject: Union[int, str], key: str) -> None: ...
def remove_properties(self, subject: Union[int, str]) -> int: ...
def remove_all_properties(self) -> None: ...
class Port:
def __init__(self, port_ptr: Any, client: Client) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __ne__(self, other: object) -> bool: ...
@property
def name(self) -> str: ...
@property
def shortname(self) -> str: ...
@shortname.setter
def shortname(self, shortname: str) -> None: ...
@property
def aliases(self) -> List[str]: ...
def set_alias(self, alias: str) -> None: ...
def unset_alias(self, alias: str) -> None: ...
@property
def uuid(self) -> str: ...
is_audio: bool = ...
is_midi: bool = ...
@property
def is_input(self) -> bool: ...
@property
def is_output(self) -> bool: ...
@property
def is_physical(self) -> bool: ...
@property
def can_monitor(self) -> bool: ...
@property
def is_terminal(self) -> bool: ...
def request_monitor(self, onoff: bool) -> None: ...
class MidiPort(Port):
is_audio: bool = ...
is_midi: bool = ...
class OwnPort(Port):
@property
def number_of_connections(self) -> int: ...
@property
def connections(self) -> List[Port]: ...
def is_connected_to(self, port: Union[str, Port]) -> bool: ...
def connect(self, port: Union[str, Port]) -> None: ...
def disconnect(self, other: Optional[Union[str, Port]] = ...) -> None: ...
def unregister(self) -> None: ...
def get_buffer(self) -> _CBufferType: ...
def get_array(self) -> _NDArray: ...
class OwnMidiPort(MidiPort, OwnPort):
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def get_buffer(self) -> _CBufferType: ...
def get_array(self) -> _NDArray: ...
@property
def max_event_size(self) -> int: ...
@property
def lost_midi_events(self) -> int: ...
def incoming_midi_events(
self,
) -> Generator[Tuple[int, _CBufferType], None, None]: ...
def clear_buffer(self) -> None: ...
def write_midi_event(self, time: int, event: Union[bytes, Sequence[int], _CBufferType]) -> None: ...
def reserve_midi_event(self, time: int, size: int) -> _CBufferType: ...
class Ports:
def __init__(self, client: Client, porttype: Any, flag: Any) -> None: ...
def __len__(self) -> int: ...
def __getitem__(self, name: str) -> Port: ...
def __iter__(self) -> Iterator[Port]: ...
def register(self, shortname: str, is_terminal: bool = ..., is_physical: bool = ...) -> Port: ...
def clear(self) -> None: ...
class RingBuffer:
def __init__(self, size: int) -> None: ...
@property
def write_space(self) -> int: ...
def write(self, data: Union[bytes, Iterable[int], _CBufferType]) -> int: ...
@property
def write_buffers(self) -> Tuple[_CBufferType, _CBufferType]: ...
def write_advance(self, size: int) -> None: ...
@property
def read_space(self) -> int: ...
def read(self, size: int) -> _CBufferType: ...
def peek(self, size: int) -> _CBufferType: ...
@property
def read_buffers(self) -> Tuple[_CBufferType, _CBufferType]: ...
def read_advance(self, size: int) -> None: ...
def mlock(self) -> None: ...
def reset(self, size: Optional[int] = ...) -> None: ...
@property
def size(self) -> int: ...
class Status:
def __init__(self, code: int) -> None: ...
@property
def failure(self) -> bool: ...
@property
def invalid_option(self) -> bool: ...
@property
def name_not_unique(self) -> bool: ...
@property
def server_started(self) -> bool: ...
@property
def server_failed(self) -> bool: ...
@property
def server_error(self) -> bool: ...
@property
def no_such_client(self) -> bool: ...
@property
def load_failure(self) -> bool: ...
@property
def init_failure(self) -> bool: ...
@property
def shm_failure(self) -> bool: ...
@property
def version_error(self) -> bool: ...
@property
def backend_error(self) -> bool: ...
@property
def client_zombie(self) -> bool: ...
class TransportState:
def __init__(self, code: int) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __hash__(self) -> int: ...
class CallbackExit(Exception): ...
def get_property(subject: Union[int, str], key: str) -> Optional[Tuple[bytes, str]]: ...
def get_properties(subject: Union[int, str]) -> Dict[str, Tuple[bytes, str]]: ...
def get_all_properties() -> Dict[str, Dict[str, Tuple[bytes, str]]]: ...
def position2dict(pos: _JackPositionT) -> Dict[str, Any]: ...
def version() -> Tuple[int, int, int, int]: ...
def version_string() -> str: ...
def client_name_size() -> int: ...
def port_name_size() -> int: ...
def set_error_function(callback: Optional[Callable[[str], None]] = ...) -> None: ...
def set_info_function(callback: Optional[Callable[[str], None]] = ...) -> None: ...
def client_pid(name: str) -> int: ...
+3
View File
@@ -0,0 +1,3 @@
version = "0.1"
python2 = true
requires = ["types-MarkupSafe", "types-typing-extensions"]
+45
View File
@@ -0,0 +1,45 @@
from jinja2.bccache import (
BytecodeCache as BytecodeCache,
FileSystemBytecodeCache as FileSystemBytecodeCache,
MemcachedBytecodeCache as MemcachedBytecodeCache,
)
from jinja2.environment import Environment as Environment, Template as Template
from jinja2.exceptions import (
TemplateAssertionError as TemplateAssertionError,
TemplateError as TemplateError,
TemplateNotFound as TemplateNotFound,
TemplatesNotFound as TemplatesNotFound,
TemplateSyntaxError as TemplateSyntaxError,
UndefinedError as UndefinedError,
)
from jinja2.filters import (
contextfilter as contextfilter,
environmentfilter as environmentfilter,
evalcontextfilter as evalcontextfilter,
)
from jinja2.loaders import (
BaseLoader as BaseLoader,
ChoiceLoader as ChoiceLoader,
DictLoader as DictLoader,
FileSystemLoader as FileSystemLoader,
FunctionLoader as FunctionLoader,
ModuleLoader as ModuleLoader,
PackageLoader as PackageLoader,
PrefixLoader as PrefixLoader,
)
from jinja2.runtime import (
DebugUndefined as DebugUndefined,
StrictUndefined as StrictUndefined,
Undefined as Undefined,
make_logging_undefined as make_logging_undefined,
)
from jinja2.utils import (
Markup as Markup,
clear_caches as clear_caches,
contextfunction as contextfunction,
environmentfunction as environmentfunction,
escape as escape,
evalcontextfunction as evalcontextfunction,
is_undefined as is_undefined,
select_autoescape as select_autoescape,
)
+36
View File
@@ -0,0 +1,36 @@
import sys
from typing import Any, Optional
if sys.version_info >= (3,):
from urllib.parse import quote_from_bytes
url_quote = quote_from_bytes
else:
import urllib
url_quote = urllib.quote
PY2: Any
PYPY: Any
unichr: Any
range_type: Any
text_type: Any
string_types: Any
integer_types: Any
iterkeys: Any
itervalues: Any
iteritems: Any
NativeStringIO: Any
def reraise(tp, value, tb: Optional[Any] = ...): ...
ifilter: Any
imap: Any
izip: Any
intern: Any
implements_iterator: Any
implements_to_string: Any
encode_filename: Any
get_next: Any
def with_metaclass(meta, *bases): ...
+40
View File
@@ -0,0 +1,40 @@
from typing import Any
Cc: str
Cf: str
Cn: str
Co: str
Cs: Any
Ll: str
Lm: str
Lo: str
Lt: str
Lu: str
Mc: str
Me: str
Mn: str
Nd: str
Nl: str
No: str
Pc: str
Pd: str
Pe: str
Pf: str
Pi: str
Po: str
Ps: str
Sc: str
Sk: str
Sm: str
So: str
Zl: str
Zp: str
Zs: str
cats: Any
def combine(*args): ...
xid_start: str
xid_continue: str
def allexcept(*args): ...
+44
View File
@@ -0,0 +1,44 @@
from typing import Any, Optional
marshal_dump: Any
marshal_load: Any
bc_version: int
bc_magic: Any
class Bucket:
environment: Any
key: Any
checksum: Any
def __init__(self, environment, key, checksum) -> None: ...
code: Any
def reset(self): ...
def load_bytecode(self, f): ...
def write_bytecode(self, f): ...
def bytecode_from_string(self, string): ...
def bytecode_to_string(self): ...
class BytecodeCache:
def load_bytecode(self, bucket): ...
def dump_bytecode(self, bucket): ...
def clear(self): ...
def get_cache_key(self, name, filename: Optional[Any] = ...): ...
def get_source_checksum(self, source): ...
def get_bucket(self, environment, name, filename, source): ...
def set_bucket(self, bucket): ...
class FileSystemBytecodeCache(BytecodeCache):
directory: Any
pattern: Any
def __init__(self, directory: Optional[Any] = ..., pattern: str = ...) -> None: ...
def load_bytecode(self, bucket): ...
def dump_bytecode(self, bucket): ...
def clear(self): ...
class MemcachedBytecodeCache(BytecodeCache):
client: Any
prefix: Any
timeout: Any
ignore_memcache_errors: Any
def __init__(self, client, prefix: str = ..., timeout: Optional[Any] = ..., ignore_memcache_errors: bool = ...) -> None: ...
def load_bytecode(self, bucket): ...
def dump_bytecode(self, bucket): ...
+177
View File
@@ -0,0 +1,177 @@
from keyword import iskeyword as is_python_keyword
from typing import Any, Optional
from jinja2.visitor import NodeVisitor
operators: Any
dict_item_iter: str
unoptimize_before_dead_code: bool
def generate(node, environment, name, filename, stream: Optional[Any] = ..., defer_init: bool = ...): ...
def has_safe_repr(value): ...
def find_undeclared(nodes, names): ...
class Identifiers:
declared: Any
outer_undeclared: Any
undeclared: Any
declared_locally: Any
declared_parameter: Any
def __init__(self) -> None: ...
def add_special(self, name): ...
def is_declared(self, name): ...
def copy(self): ...
class Frame:
eval_ctx: Any
identifiers: Any
toplevel: bool
rootlevel: bool
require_output_check: Any
buffer: Any
block: Any
assigned_names: Any
parent: Any
def __init__(self, eval_ctx, parent: Optional[Any] = ...) -> None: ...
def copy(self): ...
def inspect(self, nodes): ...
def find_shadowed(self, extra: Any = ...): ...
def inner(self): ...
def soft(self): ...
__copy__: Any
class VisitorExit(RuntimeError): ...
class DependencyFinderVisitor(NodeVisitor):
filters: Any
tests: Any
def __init__(self) -> None: ...
def visit_Filter(self, node): ...
def visit_Test(self, node): ...
def visit_Block(self, node): ...
class UndeclaredNameVisitor(NodeVisitor):
names: Any
undeclared: Any
def __init__(self, names) -> None: ...
def visit_Name(self, node): ...
def visit_Block(self, node): ...
class FrameIdentifierVisitor(NodeVisitor):
identifiers: Any
def __init__(self, identifiers) -> None: ...
def visit_Name(self, node): ...
def visit_If(self, node): ...
def visit_Macro(self, node): ...
def visit_Import(self, node): ...
def visit_FromImport(self, node): ...
def visit_Assign(self, node): ...
def visit_For(self, node): ...
def visit_CallBlock(self, node): ...
def visit_FilterBlock(self, node): ...
def visit_AssignBlock(self, node): ...
def visit_Scope(self, node): ...
def visit_Block(self, node): ...
class CompilerExit(Exception): ...
class CodeGenerator(NodeVisitor):
environment: Any
name: Any
filename: Any
stream: Any
created_block_context: bool
defer_init: Any
import_aliases: Any
blocks: Any
extends_so_far: int
has_known_extends: bool
code_lineno: int
tests: Any
filters: Any
debug_info: Any
def __init__(self, environment, name, filename, stream: Optional[Any] = ..., defer_init: bool = ...) -> None: ...
def fail(self, msg, lineno): ...
def temporary_identifier(self): ...
def buffer(self, frame): ...
def return_buffer_contents(self, frame): ...
def indent(self): ...
def outdent(self, step: int = ...): ...
def start_write(self, frame, node: Optional[Any] = ...): ...
def end_write(self, frame): ...
def simple_write(self, s, frame, node: Optional[Any] = ...): ...
def blockvisit(self, nodes, frame): ...
def write(self, x): ...
def writeline(self, x, node: Optional[Any] = ..., extra: int = ...): ...
def newline(self, node: Optional[Any] = ..., extra: int = ...): ...
def signature(self, node, frame, extra_kwargs: Optional[Any] = ...): ...
def pull_locals(self, frame): ...
def pull_dependencies(self, nodes): ...
def unoptimize_scope(self, frame): ...
def push_scope(self, frame, extra_vars: Any = ...): ...
def pop_scope(self, aliases, frame): ...
def function_scoping(self, node, frame, children: Optional[Any] = ..., find_special: bool = ...): ...
def macro_body(self, node, frame, children: Optional[Any] = ...): ...
def macro_def(self, node, frame): ...
def position(self, node): ...
def visit_Template(self, node, frame: Optional[Any] = ...): ...
def visit_Block(self, node, frame): ...
def visit_Extends(self, node, frame): ...
def visit_Include(self, node, frame): ...
def visit_Import(self, node, frame): ...
def visit_FromImport(self, node, frame): ...
def visit_For(self, node, frame): ...
def visit_If(self, node, frame): ...
def visit_Macro(self, node, frame): ...
def visit_CallBlock(self, node, frame): ...
def visit_FilterBlock(self, node, frame): ...
def visit_ExprStmt(self, node, frame): ...
def visit_Output(self, node, frame): ...
def make_assignment_frame(self, frame): ...
def export_assigned_vars(self, frame, assignment_frame): ...
def visit_Assign(self, node, frame): ...
def visit_AssignBlock(self, node, frame): ...
def visit_Name(self, node, frame): ...
def visit_Const(self, node, frame): ...
def visit_TemplateData(self, node, frame): ...
def visit_Tuple(self, node, frame): ...
def visit_List(self, node, frame): ...
def visit_Dict(self, node, frame): ...
def binop(self, interceptable: bool = ...): ...
def uaop(self, interceptable: bool = ...): ...
visit_Add: Any
visit_Sub: Any
visit_Mul: Any
visit_Div: Any
visit_FloorDiv: Any
visit_Pow: Any
visit_Mod: Any
visit_And: Any
visit_Or: Any
visit_Pos: Any
visit_Neg: Any
visit_Not: Any
def visit_Concat(self, node, frame): ...
def visit_Compare(self, node, frame): ...
def visit_Operand(self, node, frame): ...
def visit_Getattr(self, node, frame): ...
def visit_Getitem(self, node, frame): ...
def visit_Slice(self, node, frame): ...
def visit_Filter(self, node, frame): ...
def visit_Test(self, node, frame): ...
def visit_CondExpr(self, node, frame): ...
def visit_Call(self, node, frame, forward_caller: bool = ...): ...
def visit_Keyword(self, node, frame): ...
def visit_MarkSafe(self, node, frame): ...
def visit_MarkSafeIfAutoescape(self, node, frame): ...
def visit_EnvironmentAttribute(self, node, frame): ...
def visit_ExtensionAttribute(self, node, frame): ...
def visit_ImportedName(self, node, frame): ...
def visit_InternalName(self, node, frame): ...
def visit_ContextReference(self, node, frame): ...
def visit_Continue(self, node, frame): ...
def visit_Break(self, node, frame): ...
def visit_Scope(self, node, frame): ...
def visit_EvalContextModifier(self, node, frame): ...
def visit_ScopedEvalContextModifier(self, node, frame): ...
+1
View File
@@ -0,0 +1 @@
LOREM_IPSUM_WORDS: str
+37
View File
@@ -0,0 +1,37 @@
from typing import Any, Optional
tproxy: Any
raise_helper: str
class TracebackFrameProxy:
tb: Any
def __init__(self, tb) -> None: ...
@property
def tb_next(self): ...
def set_next(self, next): ...
@property
def is_jinja_frame(self): ...
def __getattr__(self, name): ...
def make_frame_proxy(frame): ...
class ProcessedTraceback:
exc_type: Any
exc_value: Any
frames: Any
def __init__(self, exc_type, exc_value, frames) -> None: ...
def render_as_text(self, limit: Optional[Any] = ...): ...
def render_as_html(self, full: bool = ...): ...
@property
def is_template_syntax_error(self): ...
@property
def exc_info(self): ...
@property
def standard_exc_info(self): ...
def make_traceback(exc_info, source_hint: Optional[Any] = ...): ...
def translate_syntax_error(error, source: Optional[Any] = ...): ...
def translate_exception(exc_info, initial_skip: int = ...): ...
def fake_exc_info(exc_info, filename, lineno): ...
tb_set_next: Any
+22
View File
@@ -0,0 +1,22 @@
from typing import Any, Dict, Optional
from jinja2.filters import FILTERS
from jinja2.tests import TESTS
DEFAULT_FILTERS = FILTERS
DEFAULT_TESTS = TESTS
BLOCK_START_STRING: str
BLOCK_END_STRING: str
VARIABLE_START_STRING: str
VARIABLE_END_STRING: str
COMMENT_START_STRING: str
COMMENT_END_STRING: str
LINE_STATEMENT_PREFIX: Optional[str]
LINE_COMMENT_PREFIX: Optional[str]
TRIM_BLOCKS: bool
LSTRIP_BLOCKS: bool
NEWLINE_SEQUENCE: str
KEEP_TRAILING_NEWLINE: bool
DEFAULT_NAMESPACE: Dict[str, Any]
DEFAULT_POLICIES = Dict[str, Any]
+224
View File
@@ -0,0 +1,224 @@
import sys
from typing import Any, Callable, Dict, Iterator, List, Optional, Sequence, Text, Type, Union
from .bccache import BytecodeCache
from .loaders import BaseLoader
from .runtime import Context, Undefined
if sys.version_info >= (3, 6):
from typing import AsyncIterator, Awaitable
def get_spontaneous_environment(*args): ...
def create_cache(size): ...
def copy_cache(cache): ...
def load_extensions(environment, extensions): ...
class Environment:
sandboxed: bool
overlayed: bool
linked_to: Any
shared: bool
exception_handler: Any
exception_formatter: Any
code_generator_class: Any
context_class: Any
block_start_string: Text
block_end_string: Text
variable_start_string: Text
variable_end_string: Text
comment_start_string: Text
comment_end_string: Text
line_statement_prefix: Text
line_comment_prefix: Text
trim_blocks: bool
lstrip_blocks: Any
newline_sequence: Text
keep_trailing_newline: bool
undefined: Type[Undefined]
optimized: bool
finalize: Callable[..., Any]
autoescape: Any
filters: Any
tests: Any
globals: Dict[str, Any]
loader: BaseLoader
cache: Any
bytecode_cache: BytecodeCache
auto_reload: bool
extensions: List[Any]
def __init__(
self,
block_start_string: Text = ...,
block_end_string: Text = ...,
variable_start_string: Text = ...,
variable_end_string: Text = ...,
comment_start_string: Any = ...,
comment_end_string: Text = ...,
line_statement_prefix: Text = ...,
line_comment_prefix: Text = ...,
trim_blocks: bool = ...,
lstrip_blocks: bool = ...,
newline_sequence: Text = ...,
keep_trailing_newline: bool = ...,
extensions: List[Any] = ...,
optimized: bool = ...,
undefined: Type[Undefined] = ...,
finalize: Optional[Callable[..., Any]] = ...,
autoescape: Union[bool, Callable[[str], bool]] = ...,
loader: Optional[BaseLoader] = ...,
cache_size: int = ...,
auto_reload: bool = ...,
bytecode_cache: Optional[BytecodeCache] = ...,
enable_async: bool = ...,
) -> None: ...
def add_extension(self, extension): ...
def extend(self, **attributes): ...
def overlay(
self,
block_start_string: Text = ...,
block_end_string: Text = ...,
variable_start_string: Text = ...,
variable_end_string: Text = ...,
comment_start_string: Any = ...,
comment_end_string: Text = ...,
line_statement_prefix: Text = ...,
line_comment_prefix: Text = ...,
trim_blocks: bool = ...,
lstrip_blocks: bool = ...,
extensions: List[Any] = ...,
optimized: bool = ...,
undefined: Type[Undefined] = ...,
finalize: Callable[..., Any] = ...,
autoescape: bool = ...,
loader: Optional[BaseLoader] = ...,
cache_size: int = ...,
auto_reload: bool = ...,
bytecode_cache: Optional[BytecodeCache] = ...,
): ...
lexer: Any
def iter_extensions(self): ...
def getitem(self, obj, argument): ...
def getattr(self, obj, attribute): ...
def call_filter(
self,
name,
value,
args: Optional[Any] = ...,
kwargs: Optional[Any] = ...,
context: Optional[Any] = ...,
eval_ctx: Optional[Any] = ...,
): ...
def call_test(self, name, value, args: Optional[Any] = ..., kwargs: Optional[Any] = ...): ...
def parse(self, source, name: Optional[Any] = ..., filename: Optional[Any] = ...): ...
def lex(self, source, name: Optional[Any] = ..., filename: Optional[Any] = ...): ...
def preprocess(self, source: Text, name: Optional[Any] = ..., filename: Optional[Any] = ...): ...
def compile(
self, source, name: Optional[Any] = ..., filename: Optional[Any] = ..., raw: bool = ..., defer_init: bool = ...
): ...
def compile_expression(self, source: Text, undefined_to_none: bool = ...): ...
def compile_templates(
self,
target,
extensions: Optional[Any] = ...,
filter_func: Optional[Any] = ...,
zip: str = ...,
log_function: Optional[Any] = ...,
ignore_errors: bool = ...,
py_compile: bool = ...,
): ...
def list_templates(self, extensions: Optional[Any] = ..., filter_func: Optional[Any] = ...): ...
def handle_exception(self, exc_info: Optional[Any] = ..., rendered: bool = ..., source_hint: Optional[Any] = ...): ...
def join_path(self, template: Union[Template, Text], parent: Text) -> Text: ...
def get_template(
self, name: Union[Template, Text], parent: Optional[Text] = ..., globals: Optional[Any] = ...
) -> Template: ...
def select_template(
self, names: Sequence[Union[Template, Text]], parent: Optional[Text] = ..., globals: Optional[Dict[str, Any]] = ...
) -> Template: ...
def get_or_select_template(
self,
template_name_or_list: Union[Union[Template, Text], Sequence[Union[Template, Text]]],
parent: Optional[Text] = ...,
globals: Optional[Dict[str, Any]] = ...,
) -> Template: ...
def from_string(
self, source: Text, globals: Optional[Dict[str, Any]] = ..., template_class: Optional[Type[Template]] = ...
) -> Template: ...
def make_globals(self, d: Optional[Dict[str, Any]]) -> Dict[str, Any]: ...
# Frequently added extensions are included here:
# from InternationalizationExtension:
def install_gettext_translations(self, translations: Any, newstyle: Optional[bool] = ...): ...
def install_null_translations(self, newstyle: Optional[bool] = ...): ...
def install_gettext_callables(
self, gettext: Callable[..., Any], ngettext: Callable[..., Any], newstyle: Optional[bool] = ...
): ...
def uninstall_gettext_translations(self, translations: Any): ...
def extract_translations(self, source: Any, gettext_functions: Any): ...
newstyle_gettext: bool
class Template:
name: Optional[str]
filename: Optional[str]
def __new__(
cls,
source,
block_start_string: Any = ...,
block_end_string: Any = ...,
variable_start_string: Any = ...,
variable_end_string: Any = ...,
comment_start_string: Any = ...,
comment_end_string: Any = ...,
line_statement_prefix: Any = ...,
line_comment_prefix: Any = ...,
trim_blocks: Any = ...,
lstrip_blocks: Any = ...,
newline_sequence: Any = ...,
keep_trailing_newline: Any = ...,
extensions: Any = ...,
optimized: bool = ...,
undefined: Any = ...,
finalize: Optional[Any] = ...,
autoescape: bool = ...,
): ...
environment: Environment = ...
@classmethod
def from_code(cls, environment, code, globals, uptodate: Optional[Any] = ...): ...
@classmethod
def from_module_dict(cls, environment, module_dict, globals): ...
def render(self, *args, **kwargs) -> Text: ...
def stream(self, *args, **kwargs) -> TemplateStream: ...
def generate(self, *args, **kwargs) -> Iterator[Text]: ...
def new_context(
self, vars: Optional[Dict[str, Any]] = ..., shared: bool = ..., locals: Optional[Dict[str, Any]] = ...
) -> Context: ...
def make_module(
self, vars: Optional[Dict[str, Any]] = ..., shared: bool = ..., locals: Optional[Dict[str, Any]] = ...
) -> Context: ...
@property
def module(self) -> Any: ...
def get_corresponding_lineno(self, lineno): ...
@property
def is_up_to_date(self) -> bool: ...
@property
def debug_info(self): ...
if sys.version_info >= (3, 6):
def render_async(self, *args, **kwargs) -> Awaitable[Text]: ...
def generate_async(self, *args, **kwargs) -> AsyncIterator[Text]: ...
class TemplateModule:
__name__: Any
def __init__(self, template, context) -> None: ...
def __html__(self): ...
class TemplateExpression:
def __init__(self, template, undefined_to_none) -> None: ...
def __call__(self, *args, **kwargs): ...
class TemplateStream:
def __init__(self, gen) -> None: ...
def dump(self, fp, encoding: Optional[Text] = ..., errors: Text = ...): ...
buffered: bool
def disable_buffering(self) -> None: ...
def enable_buffering(self, size: int = ...) -> None: ...
def __iter__(self): ...
def __next__(self): ...
+31
View File
@@ -0,0 +1,31 @@
from typing import Any, Optional, Text
class TemplateError(Exception):
def __init__(self, message: Optional[Text] = ...) -> None: ...
@property
def message(self): ...
def __unicode__(self): ...
class TemplateNotFound(IOError, LookupError, TemplateError):
message: Any
name: Any
templates: Any
def __init__(self, name, message: Optional[Text] = ...) -> None: ...
class TemplatesNotFound(TemplateNotFound):
templates: Any
def __init__(self, names: Any = ..., message: Optional[Text] = ...) -> None: ...
class TemplateSyntaxError(TemplateError):
lineno: int
name: Text
filename: Text
source: Text
translated: bool
def __init__(self, message: Text, lineno: int, name: Optional[Text] = ..., filename: Optional[Text] = ...) -> None: ...
class TemplateAssertionError(TemplateSyntaxError): ...
class TemplateRuntimeError(TemplateError): ...
class UndefinedError(TemplateRuntimeError): ...
class SecurityError(TemplateRuntimeError): ...
class FilterArgumentError(TemplateRuntimeError): ...
+66
View File
@@ -0,0 +1,66 @@
from typing import Any, Optional
GETTEXT_FUNCTIONS: Any
class ExtensionRegistry(type):
def __new__(cls, name, bases, d): ...
class Extension:
tags: Any
priority: int
environment: Any
def __init__(self, environment) -> None: ...
def bind(self, environment): ...
def preprocess(self, source, name, filename: Optional[Any] = ...): ...
def filter_stream(self, stream): ...
def parse(self, parser): ...
def attr(self, name, lineno: Optional[Any] = ...): ...
def call_method(
self,
name,
args: Optional[Any] = ...,
kwargs: Optional[Any] = ...,
dyn_args: Optional[Any] = ...,
dyn_kwargs: Optional[Any] = ...,
lineno: Optional[Any] = ...,
): ...
class InternationalizationExtension(Extension):
tags: Any
def __init__(self, environment) -> None: ...
def parse(self, parser): ...
class ExprStmtExtension(Extension):
tags: Any
def parse(self, parser): ...
class LoopControlExtension(Extension):
tags: Any
def parse(self, parser): ...
class WithExtension(Extension):
tags: Any
def parse(self, parser): ...
class AutoEscapeExtension(Extension):
tags: Any
def parse(self, parser): ...
def extract_from_ast(node, gettext_functions: Any = ..., babel_style: bool = ...): ...
class _CommentFinder:
tokens: Any
comment_tags: Any
offset: int
last_lineno: int
def __init__(self, tokens, comment_tags) -> None: ...
def find_backwards(self, offset): ...
def find_comments(self, lineno): ...
def babel_extract(fileobj, keywords, comment_tags, options): ...
i18n: Any
do: Any
loopcontrols: Any
with_: Any
autoescape: Any
+56
View File
@@ -0,0 +1,56 @@
from typing import Any, NamedTuple, Optional
def contextfilter(f): ...
def evalcontextfilter(f): ...
def environmentfilter(f): ...
def make_attrgetter(environment, attribute): ...
def do_forceescape(value): ...
def do_urlencode(value): ...
def do_replace(eval_ctx, s, old, new, count: Optional[Any] = ...): ...
def do_upper(s): ...
def do_lower(s): ...
def do_xmlattr(_eval_ctx, d, autospace: bool = ...): ...
def do_capitalize(s): ...
def do_title(s): ...
def do_dictsort(value, case_sensitive: bool = ..., by: str = ...): ...
def do_sort(environment, value, reverse: bool = ..., case_sensitive: bool = ..., attribute: Optional[Any] = ...): ...
def do_default(value, default_value: str = ..., boolean: bool = ...): ...
def do_join(eval_ctx, value, d: str = ..., attribute: Optional[Any] = ...): ...
def do_center(value, width: int = ...): ...
def do_first(environment, seq): ...
def do_last(environment, seq): ...
def do_random(environment, seq): ...
def do_filesizeformat(value, binary: bool = ...): ...
def do_pprint(value, verbose: bool = ...): ...
def do_urlize(eval_ctx, value, trim_url_limit: Optional[Any] = ..., nofollow: bool = ..., target: Optional[Any] = ...): ...
def do_indent(s, width: int = ..., indentfirst: bool = ...): ...
def do_truncate(s, length: int = ..., killwords: bool = ..., end: str = ...): ...
def do_wordwrap(environment, s, width: int = ..., break_long_words: bool = ..., wrapstring: Optional[Any] = ...): ...
def do_wordcount(s): ...
def do_int(value, default: int = ..., base: int = ...): ...
def do_float(value, default: float = ...): ...
def do_format(value, *args, **kwargs): ...
def do_trim(value): ...
def do_striptags(value): ...
def do_slice(value, slices, fill_with: Optional[Any] = ...): ...
def do_batch(value, linecount, fill_with: Optional[Any] = ...): ...
def do_round(value, precision: int = ..., method: str = ...): ...
def do_groupby(environment, value, attribute): ...
class _GroupTuple(NamedTuple):
grouper: Any
list: Any
def do_sum(environment, iterable, attribute: Optional[Any] = ..., start: int = ...): ...
def do_list(value): ...
def do_mark_safe(value): ...
def do_mark_unsafe(value): ...
def do_reverse(value): ...
def do_attr(environment, obj, name): ...
def do_map(*args, **kwargs): ...
def do_select(*args, **kwargs): ...
def do_reject(*args, **kwargs): ...
def do_selectattr(*args, **kwargs): ...
def do_rejectattr(*args, **kwargs): ...
FILTERS: Any
+117
View File
@@ -0,0 +1,117 @@
from typing import Any, Optional, Tuple
whitespace_re: Any
string_re: Any
integer_re: Any
name_re: Any
float_re: Any
newline_re: Any
TOKEN_ADD: Any
TOKEN_ASSIGN: Any
TOKEN_COLON: Any
TOKEN_COMMA: Any
TOKEN_DIV: Any
TOKEN_DOT: Any
TOKEN_EQ: Any
TOKEN_FLOORDIV: Any
TOKEN_GT: Any
TOKEN_GTEQ: Any
TOKEN_LBRACE: Any
TOKEN_LBRACKET: Any
TOKEN_LPAREN: Any
TOKEN_LT: Any
TOKEN_LTEQ: Any
TOKEN_MOD: Any
TOKEN_MUL: Any
TOKEN_NE: Any
TOKEN_PIPE: Any
TOKEN_POW: Any
TOKEN_RBRACE: Any
TOKEN_RBRACKET: Any
TOKEN_RPAREN: Any
TOKEN_SEMICOLON: Any
TOKEN_SUB: Any
TOKEN_TILDE: Any
TOKEN_WHITESPACE: Any
TOKEN_FLOAT: Any
TOKEN_INTEGER: Any
TOKEN_NAME: Any
TOKEN_STRING: Any
TOKEN_OPERATOR: Any
TOKEN_BLOCK_BEGIN: Any
TOKEN_BLOCK_END: Any
TOKEN_VARIABLE_BEGIN: Any
TOKEN_VARIABLE_END: Any
TOKEN_RAW_BEGIN: Any
TOKEN_RAW_END: Any
TOKEN_COMMENT_BEGIN: Any
TOKEN_COMMENT_END: Any
TOKEN_COMMENT: Any
TOKEN_LINESTATEMENT_BEGIN: Any
TOKEN_LINESTATEMENT_END: Any
TOKEN_LINECOMMENT_BEGIN: Any
TOKEN_LINECOMMENT_END: Any
TOKEN_LINECOMMENT: Any
TOKEN_DATA: Any
TOKEN_INITIAL: Any
TOKEN_EOF: Any
operators: Any
reverse_operators: Any
operator_re: Any
ignored_tokens: Any
ignore_if_empty: Any
def describe_token(token): ...
def describe_token_expr(expr): ...
def count_newlines(value): ...
def compile_rules(environment): ...
class Failure:
message: Any
error_class: Any
def __init__(self, message, cls: Any = ...) -> None: ...
def __call__(self, lineno, filename): ...
class Token(Tuple[int, Any, Any]):
lineno: Any
type: Any
value: Any
def __new__(cls, lineno, type, value): ...
def test(self, expr): ...
def test_any(self, *iterable): ...
class TokenStreamIterator:
stream: Any
def __init__(self, stream) -> None: ...
def __iter__(self): ...
def __next__(self): ...
class TokenStream:
name: Any
filename: Any
closed: bool
current: Any
def __init__(self, generator, name, filename) -> None: ...
def __iter__(self): ...
def __bool__(self): ...
__nonzero__: Any
eos: Any
def push(self, token): ...
def look(self): ...
def skip(self, n: int = ...): ...
def next_if(self, expr): ...
def skip_if(self, expr): ...
def __next__(self): ...
def close(self): ...
def expect(self, expr): ...
def get_lexer(environment): ...
class Lexer:
newline_sequence: Any
keep_trailing_newline: Any
rules: Any
def __init__(self, environment) -> None: ...
def tokenize(self, source, name: Optional[Any] = ..., filename: Optional[Any] = ..., state: Optional[Any] = ...): ...
def wrap(self, stream, name: Optional[Any] = ..., filename: Optional[Any] = ...): ...
def tokeniter(self, source, name, filename: Optional[Any] = ..., state: Optional[Any] = ...): ...
+80
View File
@@ -0,0 +1,80 @@
import sys
from types import ModuleType
from typing import Any, Callable, Iterable, List, Optional, Text, Tuple, Union
from .environment import Environment
if sys.version_info >= (3, 7):
from os import PathLike
_SearchPath = Union[Text, PathLike[str], Iterable[Union[Text, PathLike[str]]]]
else:
_SearchPath = Union[Text, Iterable[Text]]
def split_template_path(template: Text) -> List[Text]: ...
class BaseLoader:
has_source_access: bool
def get_source(self, environment, template): ...
def list_templates(self): ...
def load(self, environment, name, globals: Optional[Any] = ...): ...
class FileSystemLoader(BaseLoader):
searchpath: Text
encoding: Any
followlinks: Any
def __init__(self, searchpath: _SearchPath, encoding: Text = ..., followlinks: bool = ...) -> None: ...
def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable[..., Any]]: ...
def list_templates(self): ...
class PackageLoader(BaseLoader):
encoding: Text
manager: Any
filesystem_bound: Any
provider: Any
package_path: Any
def __init__(self, package_name: Text, package_path: Text = ..., encoding: Text = ...) -> None: ...
def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable[..., Any]]: ...
def list_templates(self): ...
class DictLoader(BaseLoader):
mapping: Any
def __init__(self, mapping) -> None: ...
def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable[..., Any]]: ...
def list_templates(self): ...
class FunctionLoader(BaseLoader):
load_func: Any
def __init__(self, load_func) -> None: ...
def get_source(
self, environment: Environment, template: Text
) -> Tuple[Text, Optional[Text], Optional[Callable[..., Any]]]: ...
class PrefixLoader(BaseLoader):
mapping: Any
delimiter: Any
def __init__(self, mapping, delimiter: str = ...) -> None: ...
def get_loader(self, template): ...
def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable[..., Any]]: ...
def load(self, environment, name, globals: Optional[Any] = ...): ...
def list_templates(self): ...
class ChoiceLoader(BaseLoader):
loaders: Any
def __init__(self, loaders) -> None: ...
def get_source(self, environment: Environment, template: Text) -> Tuple[Text, Text, Callable[..., Any]]: ...
def load(self, environment, name, globals: Optional[Any] = ...): ...
def list_templates(self): ...
class _TemplateModule(ModuleType): ...
class ModuleLoader(BaseLoader):
has_source_access: bool
module: Any
package_name: Any
def __init__(self, path) -> None: ...
@staticmethod
def get_template_key(name): ...
@staticmethod
def get_module_filename(name): ...
def load(self, environment, name, globals: Optional[Any] = ...): ...
+12
View File
@@ -0,0 +1,12 @@
from typing import Any
from jinja2.compiler import CodeGenerator
class TrackingCodeGenerator(CodeGenerator):
undeclared_identifiers: Any
def __init__(self, environment) -> None: ...
def write(self, x): ...
def pull_locals(self, frame): ...
def find_undeclared_variables(ast): ...
def find_referenced_templates(ast): ...
+255
View File
@@ -0,0 +1,255 @@
import typing
from typing import Any, Optional
class Impossible(Exception): ...
class NodeType(type):
def __new__(cls, name, bases, d): ...
class EvalContext:
environment: Any
autoescape: Any
volatile: bool
def __init__(self, environment, template_name: Optional[Any] = ...) -> None: ...
def save(self): ...
def revert(self, old): ...
def get_eval_context(node, ctx): ...
class Node:
fields: Any
attributes: Any
abstract: bool
def __init__(self, *fields, **attributes) -> None: ...
def iter_fields(self, exclude: Optional[Any] = ..., only: Optional[Any] = ...): ...
def iter_child_nodes(self, exclude: Optional[Any] = ..., only: Optional[Any] = ...): ...
def find(self, node_type): ...
def find_all(self, node_type): ...
def set_ctx(self, ctx): ...
def set_lineno(self, lineno, override: bool = ...): ...
def set_environment(self, environment): ...
def __eq__(self, other): ...
def __ne__(self, other): ...
__hash__: Any
class Stmt(Node):
abstract: bool
class Helper(Node):
abstract: bool
class Template(Node):
fields: Any
class Output(Stmt):
fields: Any
class Extends(Stmt):
fields: Any
class For(Stmt):
fields: Any
class If(Stmt):
fields: Any
class Macro(Stmt):
fields: Any
name: str
args: typing.List[Any]
defaults: typing.List[Any]
body: typing.List[Any]
class CallBlock(Stmt):
fields: Any
class FilterBlock(Stmt):
fields: Any
class Block(Stmt):
fields: Any
class Include(Stmt):
fields: Any
class Import(Stmt):
fields: Any
class FromImport(Stmt):
fields: Any
class ExprStmt(Stmt):
fields: Any
class Assign(Stmt):
fields: Any
class AssignBlock(Stmt):
fields: Any
class Expr(Node):
abstract: bool
def as_const(self, eval_ctx: Optional[Any] = ...): ...
def can_assign(self): ...
class BinExpr(Expr):
fields: Any
operator: Any
abstract: bool
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class UnaryExpr(Expr):
fields: Any
operator: Any
abstract: bool
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class Name(Expr):
fields: Any
def can_assign(self): ...
class Literal(Expr):
abstract: bool
class Const(Literal):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
@classmethod
def from_untrusted(cls, value, lineno: Optional[Any] = ..., environment: Optional[Any] = ...): ...
class TemplateData(Literal):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class Tuple(Literal):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
def can_assign(self): ...
class List(Literal):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class Dict(Literal):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class Pair(Helper):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class Keyword(Helper):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class CondExpr(Expr):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class Filter(Expr):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class Test(Expr):
fields: Any
class Call(Expr):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class Getitem(Expr):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
def can_assign(self): ...
class Getattr(Expr):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
def can_assign(self): ...
class Slice(Expr):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class Concat(Expr):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class Compare(Expr):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class Operand(Helper):
fields: Any
class Mul(BinExpr):
operator: str
class Div(BinExpr):
operator: str
class FloorDiv(BinExpr):
operator: str
class Add(BinExpr):
operator: str
class Sub(BinExpr):
operator: str
class Mod(BinExpr):
operator: str
class Pow(BinExpr):
operator: str
class And(BinExpr):
operator: str
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class Or(BinExpr):
operator: str
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class Not(UnaryExpr):
operator: str
class Neg(UnaryExpr):
operator: str
class Pos(UnaryExpr):
operator: str
class EnvironmentAttribute(Expr):
fields: Any
class ExtensionAttribute(Expr):
fields: Any
class ImportedName(Expr):
fields: Any
class InternalName(Expr):
fields: Any
def __init__(self) -> None: ...
class MarkSafe(Expr):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class MarkSafeIfAutoescape(Expr):
fields: Any
def as_const(self, eval_ctx: Optional[Any] = ...): ...
class ContextReference(Expr): ...
class Continue(Stmt): ...
class Break(Stmt): ...
class Scope(Stmt):
fields: Any
class EvalContextModifier(Stmt):
fields: Any
class ScopedEvalContextModifier(EvalContextModifier):
fields: Any
+30
View File
@@ -0,0 +1,30 @@
from typing import Any
from jinja2.visitor import NodeTransformer
def optimize(node, environment): ...
class Optimizer(NodeTransformer):
environment: Any
def __init__(self, environment) -> None: ...
def visit_If(self, node): ...
def fold(self, node): ...
visit_Add: Any
visit_Sub: Any
visit_Mul: Any
visit_Div: Any
visit_FloorDiv: Any
visit_Pow: Any
visit_Mod: Any
visit_And: Any
visit_Or: Any
visit_Pos: Any
visit_Neg: Any
visit_Not: Any
visit_Compare: Any
visit_Getitem: Any
visit_Getattr: Any
visit_Call: Any
visit_Filter: Any
visit_Test: Any
visit_CondExpr: Any
+68
View File
@@ -0,0 +1,68 @@
from typing import Any, Optional
class Parser:
environment: Any
stream: Any
name: Any
filename: Any
closed: bool
extensions: Any
def __init__(
self, environment, source, name: Optional[Any] = ..., filename: Optional[Any] = ..., state: Optional[Any] = ...
) -> None: ...
def fail(self, msg, lineno: Optional[Any] = ..., exc: Any = ...): ...
def fail_unknown_tag(self, name, lineno: Optional[Any] = ...): ...
def fail_eof(self, end_tokens: Optional[Any] = ..., lineno: Optional[Any] = ...): ...
def is_tuple_end(self, extra_end_rules: Optional[Any] = ...): ...
def free_identifier(self, lineno: Optional[Any] = ...): ...
def parse_statement(self): ...
def parse_statements(self, end_tokens, drop_needle: bool = ...): ...
def parse_set(self): ...
def parse_for(self): ...
def parse_if(self): ...
def parse_block(self): ...
def parse_extends(self): ...
def parse_import_context(self, node, default): ...
def parse_include(self): ...
def parse_import(self): ...
def parse_from(self): ...
def parse_signature(self, node): ...
def parse_call_block(self): ...
def parse_filter_block(self): ...
def parse_macro(self): ...
def parse_print(self): ...
def parse_assign_target(self, with_tuple: bool = ..., name_only: bool = ..., extra_end_rules: Optional[Any] = ...): ...
def parse_expression(self, with_condexpr: bool = ...): ...
def parse_condexpr(self): ...
def parse_or(self): ...
def parse_and(self): ...
def parse_not(self): ...
def parse_compare(self): ...
def parse_add(self): ...
def parse_sub(self): ...
def parse_concat(self): ...
def parse_mul(self): ...
def parse_div(self): ...
def parse_floordiv(self): ...
def parse_mod(self): ...
def parse_pow(self): ...
def parse_unary(self, with_filter: bool = ...): ...
def parse_primary(self): ...
def parse_tuple(
self,
simplified: bool = ...,
with_condexpr: bool = ...,
extra_end_rules: Optional[Any] = ...,
explicit_parentheses: bool = ...,
): ...
def parse_list(self): ...
def parse_dict(self): ...
def parse_postfix(self, node): ...
def parse_filter_expr(self, node): ...
def parse_subscript(self, node): ...
def parse_subscribed(self): ...
def parse_call(self, node): ...
def parse_filter(self, node, start_inline: bool = ...): ...
def parse_test(self, node): ...
def subparse(self, end_tokens: Optional[Any] = ...): ...
def parse(self): ...
+132
View File
@@ -0,0 +1,132 @@
from typing import Any, Dict, Optional, Text, Union
from jinja2.environment import Environment
from jinja2.exceptions import TemplateNotFound as TemplateNotFound, TemplateRuntimeError as TemplateRuntimeError
from jinja2.utils import Markup as Markup, concat as concat, escape as escape, missing as missing
to_string: Any
identity: Any
def markup_join(seq): ...
def unicode_join(seq): ...
class TemplateReference:
def __init__(self, context) -> None: ...
def __getitem__(self, name): ...
class Context:
parent: Union[Context, Dict[str, Any]]
vars: Dict[str, Any]
environment: Environment
eval_ctx: Any
exported_vars: Any
name: Text
blocks: Dict[str, Any]
def __init__(
self, environment: Environment, parent: Union[Context, Dict[str, Any]], name: Text, blocks: Dict[str, Any]
) -> None: ...
def super(self, name, current): ...
def get(self, key, default: Optional[Any] = ...): ...
def resolve(self, key): ...
def get_exported(self): ...
def get_all(self): ...
def call(__self, __obj, *args, **kwargs): ...
def derived(self, locals: Optional[Any] = ...): ...
keys: Any
values: Any
items: Any
iterkeys: Any
itervalues: Any
iteritems: Any
def __contains__(self, name): ...
def __getitem__(self, key): ...
class BlockReference:
name: Any
def __init__(self, name, context, stack, depth) -> None: ...
@property
def super(self): ...
def __call__(self): ...
class LoopContext:
index0: int
depth0: Any
def __init__(self, iterable, recurse: Optional[Any] = ..., depth0: int = ...) -> None: ...
def cycle(self, *args): ...
first: Any
last: Any
index: Any
revindex: Any
revindex0: Any
depth: Any
def __len__(self): ...
def __iter__(self): ...
def loop(self, iterable): ...
__call__: Any
@property
def length(self): ...
class LoopContextIterator:
context: Any
def __init__(self, context) -> None: ...
def __iter__(self): ...
def __next__(self): ...
class Macro:
name: Any
arguments: Any
defaults: Any
catch_kwargs: Any
catch_varargs: Any
caller: Any
def __init__(self, environment, func, name, arguments, defaults, catch_kwargs, catch_varargs, caller) -> None: ...
def __call__(self, *args, **kwargs): ...
class Undefined:
def __init__(self, hint: Optional[Any] = ..., obj: Any = ..., name: Optional[Any] = ..., exc: Any = ...) -> None: ...
def __getattr__(self, name): ...
__add__: Any
__radd__: Any
__mul__: Any
__rmul__: Any
__div__: Any
__rdiv__: Any
__truediv__: Any
__rtruediv__: Any
__floordiv__: Any
__rfloordiv__: Any
__mod__: Any
__rmod__: Any
__pos__: Any
__neg__: Any
__call__: Any
__getitem__: Any
__lt__: Any
__le__: Any
__gt__: Any
__ge__: Any
__int__: Any
__float__: Any
__complex__: Any
__pow__: Any
__rpow__: Any
def __eq__(self, other): ...
def __ne__(self, other): ...
def __hash__(self): ...
def __len__(self): ...
def __iter__(self): ...
def __nonzero__(self): ...
__bool__: Any
def make_logging_undefined(logger: Optional[Any] = ..., base: Optional[Any] = ...): ...
class DebugUndefined(Undefined): ...
class StrictUndefined(Undefined):
__iter__: Any
__len__: Any
__nonzero__: Any
__eq__: Any
__ne__: Any
__bool__: Any
__hash__: Any
+35
View File
@@ -0,0 +1,35 @@
from typing import Any
from jinja2.environment import Environment
MAX_RANGE: int
UNSAFE_FUNCTION_ATTRIBUTES: Any
UNSAFE_METHOD_ATTRIBUTES: Any
UNSAFE_GENERATOR_ATTRIBUTES: Any
def safe_range(*args): ...
def unsafe(f): ...
def is_internal_attribute(obj, attr): ...
def modifies_known_mutable(obj, attr): ...
class SandboxedEnvironment(Environment):
sandboxed: bool
default_binop_table: Any
default_unop_table: Any
intercepted_binops: Any
intercepted_unops: Any
def intercept_unop(self, operator): ...
binop_table: Any
unop_table: Any
def __init__(self, *args, **kwargs) -> None: ...
def is_safe_attribute(self, obj, attr, value): ...
def is_safe_callable(self, obj): ...
def call_binop(self, context, operator, left, right): ...
def call_unop(self, context, operator, arg): ...
def getitem(self, obj, argument): ...
def getattr(self, obj, attribute): ...
def unsafe_undefined(self, obj, attribute): ...
def call(__self, __context, __obj, *args, **kwargs): ...
class ImmutableSandboxedEnvironment(SandboxedEnvironment):
def is_safe_attribute(self, obj, attr, value): ...
+24
View File
@@ -0,0 +1,24 @@
from typing import Any
number_re: Any
regex_type: Any
test_callable: Any
def test_odd(value): ...
def test_even(value): ...
def test_divisibleby(value, num): ...
def test_defined(value): ...
def test_undefined(value): ...
def test_none(value): ...
def test_lower(value): ...
def test_upper(value): ...
def test_string(value): ...
def test_mapping(value): ...
def test_number(value): ...
def test_sequence(value): ...
def test_equalto(value, other): ...
def test_sameas(value, other): ...
def test_iterable(value): ...
def test_escaped(value): ...
TESTS: Any
+87
View File
@@ -0,0 +1,87 @@
from _typeshed import AnyPath
from typing import IO, Any, Callable, Iterable, Optional, Protocol, Text, TypeVar, Union
from typing_extensions import Literal
from markupsafe import Markup as Markup, escape as escape, soft_unicode as soft_unicode
missing: Any
internal_code: Any
concat: Any
_CallableT = TypeVar("_CallableT", bound=Callable[..., Any])
class _ContextFunction(Protocol[_CallableT]):
contextfunction: Literal[True]
__call__: _CallableT
class _EvalContextFunction(Protocol[_CallableT]):
evalcontextfunction: Literal[True]
__call__: _CallableT
class _EnvironmentFunction(Protocol[_CallableT]):
environmentfunction: Literal[True]
__call__: _CallableT
def contextfunction(f: _CallableT) -> _ContextFunction[_CallableT]: ...
def evalcontextfunction(f: _CallableT) -> _EvalContextFunction[_CallableT]: ...
def environmentfunction(f: _CallableT) -> _EnvironmentFunction[_CallableT]: ...
def internalcode(f: _CallableT) -> _CallableT: ...
def is_undefined(obj: object) -> bool: ...
def select_autoescape(
enabled_extensions: Iterable[str] = ...,
disabled_extensions: Iterable[str] = ...,
default_for_string: bool = ...,
default: bool = ...,
) -> Callable[[str], bool]: ...
def consume(iterable: Iterable[object]) -> None: ...
def clear_caches() -> None: ...
def import_string(import_name: str, silent: bool = ...) -> Any: ...
def open_if_exists(filename: AnyPath, mode: str = ...) -> Optional[IO[Any]]: ...
def object_type_repr(obj: object) -> str: ...
def pformat(obj: object, verbose: bool = ...) -> str: ...
def urlize(
text: Union[Markup, Text],
trim_url_limit: Optional[int] = ...,
rel: Optional[Union[Markup, Text]] = ...,
target: Optional[Union[Markup, Text]] = ...,
) -> str: ...
def generate_lorem_ipsum(n: int = ..., html: bool = ..., min: int = ..., max: int = ...) -> Union[Markup, str]: ...
def unicode_urlencode(obj: object, charset: str = ..., for_qs: bool = ...) -> str: ...
class LRUCache:
capacity: Any
def __init__(self, capacity) -> None: ...
def __getnewargs__(self): ...
def copy(self): ...
def get(self, key, default: Optional[Any] = ...): ...
def setdefault(self, key, default: Optional[Any] = ...): ...
def clear(self): ...
def __contains__(self, key): ...
def __len__(self): ...
def __getitem__(self, key): ...
def __setitem__(self, key, value): ...
def __delitem__(self, key): ...
def items(self): ...
def iteritems(self): ...
def values(self): ...
def itervalue(self): ...
def keys(self): ...
def iterkeys(self): ...
__iter__: Any
def __reversed__(self): ...
__copy__: Any
class Cycler:
items: Any
def __init__(self, *items) -> None: ...
pos: int
def reset(self): ...
@property
def current(self): ...
def __next__(self): ...
class Joiner:
sep: Any
used: bool
def __init__(self, sep: str = ...) -> None: ...
def __call__(self): ...
+8
View File
@@ -0,0 +1,8 @@
class NodeVisitor:
def get_visitor(self, node): ...
def visit(self, node, *args, **kwargs): ...
def generic_visit(self, node, *args, **kwargs): ...
class NodeTransformer(NodeVisitor):
def generic_visit(self, node, *args, **kwargs): ...
def visit_list(self, node, *args, **kwargs): ...
+3
View File
@@ -0,0 +1,3 @@
version = "0.1"
python2 = true
requires = ["types-typing-extensions"]
+2
View File
@@ -0,0 +1,2 @@
from .core import Markdown as Markdown, markdown as markdown, markdownFromFile as markdownFromFile
from .extensions import Extension as Extension
+3
View File
@@ -0,0 +1,3 @@
from typing import Any
__version_info__: Any
+18
View File
@@ -0,0 +1,18 @@
from typing import Any
class State(list):
def set(self, state) -> None: ...
def reset(self) -> None: ...
def isstate(self, state): ...
class BlockParser:
blockprocessors: Any
state: Any
md: Any
def __init__(self, md) -> None: ...
@property
def markdown(self): ...
root: Any
def parseDocument(self, lines): ...
def parseChunk(self, parent, text) -> None: ...
def parseBlocks(self, parent, blocks) -> None: ...
@@ -0,0 +1,59 @@
from typing import Any, Pattern
logger: Any
def build_block_parser(md, **kwargs): ...
class BlockProcessor:
parser: Any
tab_length: Any
def __init__(self, parser) -> None: ...
def lastChild(self, parent): ...
def detab(self, text): ...
def looseDetab(self, text, level: int = ...): ...
def test(self, parent, block) -> None: ...
def run(self, parent, blocks) -> None: ...
class ListIndentProcessor(BlockProcessor):
ITEM_TYPES: Any
LIST_TYPES: Any
INDENT_RE: Pattern
def __init__(self, *args) -> None: ...
def create_item(self, parent, block) -> None: ...
def get_level(self, parent, block): ...
class CodeBlockProcessor(BlockProcessor): ...
class BlockQuoteProcessor(BlockProcessor):
RE: Pattern
def clean(self, line): ...
class OListProcessor(BlockProcessor):
TAG: str = ...
STARTSWITH: str = ...
LAZY_OL: bool = ...
SIBLING_TAGS: Any
RE: Pattern
CHILD_RE: Pattern
INDENT_RE: Pattern
def __init__(self, parser) -> None: ...
def get_items(self, block): ...
class UListProcessor(OListProcessor):
TAG: str = ...
RE: Pattern
def __init__(self, parser) -> None: ...
class HashHeaderProcessor(BlockProcessor):
RE: Pattern
class SetextHeaderProcessor(BlockProcessor):
RE: Pattern
class HRProcessor(BlockProcessor):
RE: str = ...
SEARCH_RE: Pattern
match: Any
class EmptyBlockProcessor(BlockProcessor): ...
class ParagraphProcessor(BlockProcessor): ...
+63
View File
@@ -0,0 +1,63 @@
from typing import Any, BinaryIO, Callable, ClassVar, Dict, List, Mapping, Optional, Sequence, Text, TextIO, Union
from typing_extensions import Literal
from xml.etree.ElementTree import Element
from .blockparser import BlockParser
from .extensions import Extension
from .util import HtmlStash, Registry
class Markdown:
preprocessors: Registry
inlinePatterns: Registry
treeprocessors: Registry
postprocessors: Registry
parser: BlockParser
htmlStash: HtmlStash
output_formats: ClassVar[Dict[Literal["xhtml", "html"], Callable[[Element], Text]]]
output_format: Literal["xhtml", "html"]
serializer: Callable[[Element], Text]
tab_length: int
block_level_elements: List[str]
def __init__(
self,
*,
extensions: Optional[Sequence[Union[str, Extension]]] = ...,
extension_configs: Optional[Mapping[str, Mapping[str, Any]]] = ...,
output_format: Optional[Literal["xhtml", "html"]] = ...,
tab_length: Optional[int] = ...,
) -> None: ...
def build_parser(self) -> Markdown: ...
def registerExtensions(
self, extensions: Sequence[Union[Extension, str]], configs: Mapping[str, Mapping[str, Any]]
) -> Markdown: ...
def build_extension(self, ext_name: Text, configs: Mapping[str, str]) -> Extension: ...
def registerExtension(self, extension: Extension) -> Markdown: ...
def reset(self: Markdown) -> Markdown: ...
def set_output_format(self, format: Literal["xhtml", "html"]) -> Markdown: ...
def is_block_level(self, tag: str) -> bool: ...
def convert(self, source: Text) -> Text: ...
def convertFile(
self,
input: Optional[Union[str, TextIO, BinaryIO]] = ...,
output: Optional[Union[str, TextIO, BinaryIO]] = ...,
encoding: Optional[str] = ...,
) -> Markdown: ...
def markdown(
text: Text,
*,
extensions: Optional[Sequence[Union[str, Extension]]] = ...,
extension_configs: Optional[Mapping[str, Mapping[str, Any]]] = ...,
output_format: Optional[Literal["xhtml", "html"]] = ...,
tab_length: Optional[int] = ...,
) -> Text: ...
def markdownFromFile(
*,
input: Optional[Union[str, TextIO, BinaryIO]] = ...,
output: Optional[Union[str, TextIO, BinaryIO]] = ...,
encoding: Optional[str] = ...,
extensions: Optional[Sequence[Union[str, Extension]]] = ...,
extension_configs: Optional[Mapping[str, Mapping[str, Any]]] = ...,
output_format: Optional[Literal["xhtml", "html"]] = ...,
tab_length: Optional[int] = ...,
) -> None: ...
@@ -0,0 +1,13 @@
from typing import Any, Dict, List, Mapping, Tuple
from markdown.core import Markdown
class Extension:
config: Mapping[str, List[Any]] = ...
def __init__(self, **kwargs: Any) -> None: ...
def getConfig(self, key: str, default: Any = ...) -> Any: ...
def getConfigs(self) -> Dict[str, Any]: ...
def getConfigInfo(self) -> List[Tuple[str, str]]: ...
def setConfig(self, key: str, value: Any) -> None: ...
def setConfigs(self, items: Mapping[str, Any]) -> None: ...
def extendMarkdown(self, md: Markdown) -> None: ...
@@ -0,0 +1,16 @@
from typing import Any, Pattern
from markdown.blockprocessors import BlockProcessor
from markdown.extensions import Extension
from markdown.inlinepatterns import InlineProcessor
ABBR_REF_RE: Pattern
class AbbrExtension(Extension): ...
class AbbrPreprocessor(BlockProcessor): ...
class AbbrInlineProcessor(InlineProcessor):
title: Any
def __init__(self, pattern, title) -> None: ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,15 @@
from typing import Any, Pattern
from markdown.blockprocessors import BlockProcessor
from markdown.extensions import Extension
class AdmonitionExtension(Extension): ...
class AdmonitionProcessor(BlockProcessor):
CLASSNAME: str = ...
CLASSNAME_TITLE: str = ...
RE: Pattern
RE_SPACES: Any
def get_class_and_title(self, match): ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,20 @@
from typing import Any, Pattern
from markdown.extensions import Extension
from markdown.treeprocessors import Treeprocessor
def get_attrs(str): ...
def isheader(elem): ...
class AttrListTreeprocessor(Treeprocessor):
BASE_RE: str = ...
HEADER_RE: Pattern
BLOCK_RE: Pattern
INLINE_RE: Pattern
NAME_RE: Pattern
def assign_attrs(self, elem, attrs) -> None: ...
def sanitize_name(self, name): ...
class AttrListExtension(Extension): ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,42 @@
from typing import Any, Optional
from markdown.extensions import Extension
from markdown.treeprocessors import Treeprocessor
pygments: bool
def parse_hl_lines(expr): ...
class CodeHilite:
src: Any
lang: Any
linenums: Any
guess_lang: Any
css_class: Any
style: Any
noclasses: Any
tab_length: Any
hl_lines: Any
use_pygments: Any
def __init__(
self,
src: Optional[Any] = ...,
linenums: Optional[Any] = ...,
guess_lang: bool = ...,
css_class: str = ...,
lang: Optional[Any] = ...,
style: str = ...,
noclasses: bool = ...,
tab_length: int = ...,
hl_lines: Optional[Any] = ...,
use_pygments: bool = ...,
) -> None: ...
def hilite(self): ...
class HiliteTreeprocessor(Treeprocessor):
def code_unescape(self, text): ...
class CodeHiliteExtension(Extension):
def __init__(self, **kwargs) -> None: ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,13 @@
from typing import Any, Pattern
from markdown.blockprocessors import BlockProcessor, ListIndentProcessor
from markdown.extensions import Extension
class DefListProcessor(BlockProcessor):
RE: Pattern
NO_INDENT_RE: Pattern
class DefListIndentProcessor(ListIndentProcessor): ...
class DefListExtension(Extension): ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,10 @@
from typing import Any
from markdown.extensions import Extension
extensions: Any
class ExtraExtension(Extension):
def __init__(self, **kwargs) -> None: ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,16 @@
from typing import Any, Pattern
from markdown.extensions import Extension
from markdown.preprocessors import Preprocessor
class FencedCodeExtension(Extension): ...
class FencedBlockPreprocessor(Preprocessor):
FENCED_BLOCK_RE: Pattern
CODE_WRAP: str = ...
LANG_TAG: str = ...
checked_for_codehilite: bool = ...
codehilite_conf: Any
def __init__(self, md) -> None: ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,57 @@
from typing import Any, Pattern
from markdown.extensions import Extension
from markdown.inlinepatterns import InlineProcessor
from markdown.postprocessors import Postprocessor
from markdown.preprocessors import Preprocessor
from markdown.treeprocessors import Treeprocessor
FN_BACKLINK_TEXT: Any
NBSP_PLACEHOLDER: Any
DEF_RE: Pattern
TABBED_RE: Pattern
RE_REF_ID: Any
class FootnoteExtension(Extension):
unique_prefix: int = ...
found_refs: Any
used_refs: Any
def __init__(self, **kwargs) -> None: ...
parser: Any
md: Any
footnotes: Any
def reset(self) -> None: ...
def unique_ref(self, reference, found: bool = ...): ...
def findFootnotesPlaceholder(self, root): ...
def setFootnote(self, id, text) -> None: ...
def get_separator(self): ...
def makeFootnoteId(self, id): ...
def makeFootnoteRefId(self, id, found: bool = ...): ...
def makeFootnotesDiv(self, root): ...
class FootnotePreprocessor(Preprocessor):
footnotes: Any
def __init__(self, footnotes) -> None: ...
def detectTabbed(self, lines): ...
class FootnoteInlineProcessor(InlineProcessor):
footnotes: Any
def __init__(self, pattern, footnotes) -> None: ...
class FootnotePostTreeprocessor(Treeprocessor):
footnotes: Any
def __init__(self, footnotes) -> None: ...
def add_duplicates(self, li, duplicates) -> None: ...
def get_num_duplicates(self, li): ...
def handle_duplicates(self, parent) -> None: ...
offset: int = ...
class FootnoteTreeprocessor(Treeprocessor):
footnotes: Any
def __init__(self, footnotes) -> None: ...
class FootnotePostprocessor(Postprocessor):
footnotes: Any
def __init__(self, footnotes) -> None: ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,13 @@
from typing import Any, Pattern
from markdown.extensions import Extension
from markdown.treeprocessors import Treeprocessor
ATTR_RE: Pattern
class LegacyAttrs(Treeprocessor):
def handleAttributes(self, el, txt): ...
class LegacyAttrExtension(Extension): ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,13 @@
from typing import Any
from markdown.extensions import Extension
from markdown.inlinepatterns import UnderscoreProcessor
EMPHASIS_RE: str
STRONG_RE: str
STRONG_EM_RE: str
class LegacyUnderscoreProcessor(UnderscoreProcessor): ...
class LegacyEmExtension(Extension): ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,9 @@
from typing import Any, Optional
from markdown.blockprocessors import BlockProcessor
from markdown.extensions import Extension
class MarkdownInHtmlProcessor(BlockProcessor): ...
class MarkdownInHtmlExtension(Extension): ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,18 @@
from typing import Any, Pattern
from markdown.extensions import Extension
from markdown.preprocessors import Preprocessor
log: Any
META_RE: Pattern
META_MORE_RE: Pattern
BEGIN_RE: Pattern
END_RE: Pattern
class MetaExtension(Extension):
md: Any
def reset(self) -> None: ...
class MetaPreprocessor(Preprocessor): ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,9 @@
from typing import Any
from markdown.extensions import Extension
BR_RE: str
class Nl2BrExtension(Extension): ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,14 @@
from typing import Any, Pattern
from markdown.blockprocessors import OListProcessor, UListProcessor
from markdown.extensions import Extension
class SaneOListProcessor(OListProcessor):
def __init__(self, parser) -> None: ...
class SaneUListProcessor(UListProcessor):
def __init__(self, parser) -> None: ...
class SaneListExtension(Extension): ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,39 @@
from typing import Any, Pattern
from markdown.extensions import Extension
from markdown.inlinepatterns import HtmlInlineProcessor
punctClass: str
endOfWordClass: str
closeClass: str
openingQuotesBase: str
substitutions: Any
singleQuoteStartRe: Any
doubleQuoteStartRe: Any
doubleQuoteSetsRe: str
singleQuoteSetsRe: str
decadeAbbrRe: str
openingDoubleQuotesRegex: Any
closingDoubleQuotesRegex: str
closingDoubleQuotesRegex2: Any
openingSingleQuotesRegex: Any
closingSingleQuotesRegex: Any
closingSingleQuotesRegex2: Any
remainingSingleQuotesRegex: str
remainingDoubleQuotesRegex: str
HTML_STRICT_RE: str
class SubstituteTextPattern(HtmlInlineProcessor):
replace: Any
def __init__(self, pattern, replace, md) -> None: ...
class SmartyExtension(Extension):
substitutions: Any
def __init__(self, **kwargs) -> None: ...
def educateDashes(self, md) -> None: ...
def educateEllipses(self, md) -> None: ...
def educateAngledQuotes(self, md) -> None: ...
def educateQuotes(self, md) -> None: ...
inlinePatterns: Any
def makeExtension(**kwargs): ...
@@ -0,0 +1,19 @@
from typing import Any
from markdown.blockprocessors import BlockProcessor
from markdown.extensions import Extension
PIPE_NONE: int
PIPE_LEFT: int
PIPE_RIGHT: int
class TableProcessor(BlockProcessor):
RE_CODE_PIPES: Any
RE_END_BORDER: Any
border: bool = ...
separator: str = ...
def __init__(self, parser) -> None: ...
class TableExtension(Extension): ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,44 @@
from typing import Any, Pattern
from markdown.extensions import Extension
from markdown.treeprocessors import Treeprocessor
def slugify(value, separator): ...
IDCOUNT_RE: Pattern
def unique(id, ids): ...
def get_name(el): ...
def stashedHTML2text(text, md, strip_entities: bool = ...): ...
def unescape(text): ...
def nest_toc_tokens(toc_list): ...
class TocTreeprocessor(Treeprocessor):
marker: Any
title: Any
base_level: Any
slugify: Any
sep: Any
use_anchors: Any
anchorlink_class: Any
use_permalinks: Any
permalink_class: Any
permalink_title: Any
header_rgx: Any
toc_top: int = ...
toc_bottom: Any
def __init__(self, md, config) -> None: ...
def iterparent(self, node) -> None: ...
def replace_marker(self, root, elem) -> None: ...
def set_level(self, elem) -> None: ...
def add_anchor(self, c, elem_id) -> None: ...
def add_permalink(self, c, elem_id) -> None: ...
def build_toc_div(self, toc_list): ...
class TocExtension(Extension):
TreeProcessorClass: Any
def __init__(self, **kwargs) -> None: ...
md: Any
def reset(self) -> None: ...
def makeExtension(**kwargs): ...
@@ -0,0 +1,16 @@
from typing import Any
from markdown.extensions import Extension
from markdown.inlinepatterns import InlineProcessor
def build_url(label, base, end): ...
class WikiLinkExtension(Extension):
def __init__(self, **kwargs) -> None: ...
md: Any
class WikiLinksInlineProcessor(InlineProcessor):
config: Any
def __init__(self, pattern, config) -> None: ...
def makeExtension(**kwargs): ...
+103
View File
@@ -0,0 +1,103 @@
from typing import Any, Match, Optional, Tuple, Union
from xml.etree.ElementTree import Element
def build_inlinepatterns(md, **kwargs): ...
NOIMG: str
BACKTICK_RE: str
ESCAPE_RE: str
EMPHASIS_RE: str
STRONG_RE: str
SMART_STRONG_RE: str
SMART_EMPHASIS_RE: str
SMART_STRONG_EM_RE: str
EM_STRONG_RE: str
EM_STRONG2_RE: str
STRONG_EM_RE: str
STRONG_EM2_RE: str
STRONG_EM3_RE: str
LINK_RE: str
IMAGE_LINK_RE: str
REFERENCE_RE: str
IMAGE_REFERENCE_RE: str
NOT_STRONG_RE: str
AUTOLINK_RE: str
AUTOMAIL_RE: str
HTML_RE: str
ENTITY_RE: str
LINE_BREAK_RE: str
def dequote(string): ...
class EmStrongItem: ...
class Pattern:
ANCESTOR_EXCLUDES: Any
pattern: Any
compiled_re: Any
md: Any
def __init__(self, pattern, md: Optional[Any] = ...) -> None: ...
@property
def markdown(self): ...
def getCompiledRegExp(self): ...
def handleMatch(self, m: Match) -> Optional[Union[str, Element]]: ...
def type(self): ...
def unescape(self, text): ...
class InlineProcessor(Pattern):
safe_mode: bool = ...
def __init__(self, pattern, md: Optional[Any] = ...) -> None: ...
def handleMatch(self, m: Match, data) -> Union[Tuple[Element, int, int], Tuple[None, None, None]]: ... # type: ignore
class SimpleTextPattern(Pattern): ...
class SimpleTextInlineProcessor(InlineProcessor): ...
class EscapeInlineProcessor(InlineProcessor): ...
class SimpleTagPattern(Pattern):
tag: Any
def __init__(self, pattern, tag) -> None: ...
class SimpleTagInlineProcessor(InlineProcessor):
tag: Any
def __init__(self, pattern, tag) -> None: ...
class SubstituteTagPattern(SimpleTagPattern): ...
class SubstituteTagInlineProcessor(SimpleTagInlineProcessor): ...
class BacktickInlineProcessor(InlineProcessor):
ESCAPED_BSLASH: Any
tag: str = ...
def __init__(self, pattern) -> None: ...
class DoubleTagPattern(SimpleTagPattern): ...
class DoubleTagInlineProcessor(SimpleTagInlineProcessor): ...
class HtmlInlineProcessor(InlineProcessor): ...
class AsteriskProcessor(InlineProcessor):
PATTERNS: Any
def build_single(self, m, tag, idx): ...
def build_double(self, m, tags, idx): ...
def build_double2(self, m, tags, idx): ...
def parse_sub_patterns(self, data, parent, last, idx) -> None: ...
def build_element(self, m, builder, tags, index): ...
class UnderscoreProcessor(AsteriskProcessor):
PATTERNS: Any
class LinkInlineProcessor(InlineProcessor):
RE_LINK: Any
RE_TITLE_CLEAN: Any
def getLink(self, data, index): ...
def getText(self, data, index): ...
class ImageInlineProcessor(LinkInlineProcessor): ...
class ReferenceInlineProcessor(LinkInlineProcessor):
NEWLINE_CLEANUP_RE: Pattern
def evalId(self, data, index, text): ...
def makeTag(self, href, title, text): ...
class ShortReferenceInlineProcessor(ReferenceInlineProcessor): ...
class ImageReferenceInlineProcessor(ReferenceInlineProcessor): ...
class AutolinkInlineProcessor(InlineProcessor): ...
class AutomailInlineProcessor(InlineProcessor): ...
+9
View File
@@ -0,0 +1,9 @@
from typing import Any
class Version:
def __new__(cls, major, minor, micro, release: str = ..., pre: int = ..., post: int = ..., dev: int = ...): ...
class Pep562:
def __init__(self, name) -> None: ...
def __dir__(self): ...
def __getattr__(self, name): ...
@@ -0,0 +1,17 @@
from typing import Any, Pattern
from . import util
def build_postprocessors(md, **kwargs): ...
class Postprocessor(util.Processor):
def run(self, text) -> Any: ...
class RawHtmlPostprocessor(Postprocessor):
def isblocklevel(self, html): ...
class AndSubstitutePostprocessor(Postprocessor): ...
class UnescapePostprocessor(Postprocessor):
RE: Pattern
def unescape(self, m): ...
+23
View File
@@ -0,0 +1,23 @@
from typing import Any, Iterable, List, Pattern
from . import util
def build_preprocessors(md, **kwargs): ...
class Preprocessor(util.Processor):
def run(self, lines: List[str]) -> List[str]: ...
class NormalizeWhitespace(Preprocessor): ...
class HtmlBlockPreprocessor(Preprocessor):
right_tag_patterns: Any
attrs_pattern: str = ...
left_tag_pattern: Any
attrs_re: Any
left_tag_re: Any
markdown_in_raw: bool = ...
class ReferencePreprocessor(Preprocessor):
TITLE: str = ...
RE: Pattern
TITLE_RE: Pattern
+4
View File
@@ -0,0 +1,4 @@
from typing import Any
def to_html_string(element): ...
def to_xhtml_string(element): ...
@@ -0,0 +1,19 @@
from typing import Any, Optional
from . import util
def build_treeprocessors(md, **kwargs): ...
def isString(s): ...
class Treeprocessor(util.Processor):
def run(self, root) -> Optional[Any]: ...
class InlineProcessor(Treeprocessor):
inlinePatterns: Any
ancestors: Any
def __init__(self, md) -> None: ...
stashed_nodes: Any
parent_map: Any
def run(self, tree, ancestors: Optional[Any] = ...): ...
class PrettifyTreeprocessor(Treeprocessor): ...
+56
View File
@@ -0,0 +1,56 @@
from collections import namedtuple
from typing import Any, Optional, Pattern
PY37: Any
__deprecated__: Any
BLOCK_LEVEL_ELEMENTS: Any
STX: str
ETX: str
INLINE_PLACEHOLDER_PREFIX: Any
INLINE_PLACEHOLDER: Any
INLINE_PLACEHOLDER_RE: Pattern
AMP_SUBSTITUTE: Any
HTML_PLACEHOLDER: Any
HTML_PLACEHOLDER_RE: Pattern
TAG_PLACEHOLDER: Any
INSTALLED_EXTENSIONS: Any
RTL_BIDI_RANGES: Any
def deprecated(message, stacklevel: int = ...): ...
def isBlockLevel(tag): ...
def parseBoolValue(value, fail_on_errors: bool = ..., preserve_none: bool = ...): ...
def code_escape(text): ...
class AtomicString(str): ...
class Processor:
md: Any
def __init__(self, md: Optional[Any] = ...) -> None: ...
@property
def markdown(self): ...
class HtmlStash:
html_counter: int = ...
rawHtmlBlocks: Any
tag_counter: int = ...
tag_data: Any
def __init__(self) -> None: ...
def store(self, html): ...
def reset(self) -> None: ...
def get_placeholder(self, key): ...
def store_tag(self, tag, attrs, left_index, right_index): ...
class Registry:
def __init__(self) -> None: ...
def __contains__(self, item): ...
def __iter__(self) -> Any: ...
def __getitem__(self, key): ...
def __len__(self): ...
def get_index_for_name(self, name): ...
def register(self, item, name, priority) -> None: ...
def deregister(self, name, strict: bool = ...) -> None: ...
def __setitem__(self, key, value) -> None: ...
def __delitem__(self, key) -> None: ...
def add(self, key, value, location) -> None: ...
def __getattr__(name): ...
+2
View File
@@ -0,0 +1,2 @@
version = "0.1"
python2 = true
+55
View File
@@ -0,0 +1,55 @@
import string
import sys
from collections import Mapping
from typing import Any, Callable, Iterable, List, Optional, Sequence, Text, Tuple, Union
from markupsafe._compat import text_type
from markupsafe._native import escape as escape, escape_silent as escape_silent, soft_unicode as soft_unicode
class Markup(text_type):
def __new__(cls, base: Text = ..., encoding: Optional[Text] = ..., errors: Text = ...) -> Markup: ...
def __html__(self) -> Markup: ...
def __add__(self, other: text_type) -> Markup: ...
def __radd__(self, other: text_type) -> Markup: ...
def __mul__(self, num: int) -> Markup: ...
def __rmul__(self, num: int) -> Markup: ...
def __mod__(self, *args: Any) -> Markup: ...
def join(self, seq: Iterable[text_type]): ...
def split(self, sep: Optional[text_type] = ..., maxsplit: int = ...) -> List[text_type]: ...
def rsplit(self, sep: Optional[text_type] = ..., maxsplit: int = ...) -> List[text_type]: ...
def splitlines(self, keepends: bool = ...) -> List[text_type]: ...
def unescape(self) -> Text: ...
def striptags(self) -> Text: ...
@classmethod
def escape(cls, s: text_type) -> Markup: ... # noqa: F811
def partition(self, sep: text_type) -> Tuple[Markup, Markup, Markup]: ...
def rpartition(self, sep: text_type) -> Tuple[Markup, Markup, Markup]: ...
def format(self, *args, **kwargs) -> Markup: ...
def __html_format__(self, format_spec) -> Markup: ...
def __getslice__(self, start: int, stop: int) -> Markup: ...
def __getitem__(self, i: Union[int, slice]) -> Markup: ...
def capitalize(self) -> Markup: ...
def title(self) -> Markup: ...
def lower(self) -> Markup: ...
def upper(self) -> Markup: ...
def swapcase(self) -> Markup: ...
def replace(self, old: text_type, new: text_type, count: int = ...) -> Markup: ...
def ljust(self, width: int, fillchar: text_type = ...) -> Markup: ...
def rjust(self, width: int, fillchar: text_type = ...) -> Markup: ...
def lstrip(self, chars: Optional[text_type] = ...) -> Markup: ...
def rstrip(self, chars: Optional[text_type] = ...) -> Markup: ...
def strip(self, chars: Optional[text_type] = ...) -> Markup: ...
def center(self, width: int, fillchar: text_type = ...) -> Markup: ...
def zfill(self, width: int) -> Markup: ...
def translate(
self, table: Union[Mapping[int, Union[int, text_type, None]], Sequence[Union[int, text_type, None]]]
) -> Markup: ...
def expandtabs(self, tabsize: int = ...) -> Markup: ...
class EscapeFormatter(string.Formatter):
escape: Callable[[text_type], Markup]
def __init__(self, escape: Callable[[text_type], Markup]) -> None: ... # noqa: F811
def format_field(self, value: text_type, format_spec: text_type) -> Markup: ...
if sys.version_info >= (3,):
soft_str = soft_unicode
+21
View File
@@ -0,0 +1,21 @@
import sys
from typing import Iterator, Mapping, Tuple, TypeVar
_K = TypeVar("_K")
_V = TypeVar("_V")
PY2: bool
def iteritems(d: Mapping[_K, _V]) -> Iterator[Tuple[_K, _V]]: ...
if sys.version_info >= (3,):
text_type = str
string_types = (str,)
unichr = chr
int_types = (int,)
else:
from __builtin__ import unichr as unichr
text_type = unicode
string_types = (str, unicode)
int_types = (int, long)
@@ -0,0 +1,3 @@
from typing import Dict, Text
HTML_ENTITIES: Dict[Text, int]
+8
View File
@@ -0,0 +1,8 @@
from typing import Text, Union
from . import Markup
from ._compat import text_type
def escape(s: Union[Markup, Text]) -> Markup: ...
def escape_silent(s: Union[None, Markup, Text]) -> Markup: ...
def soft_unicode(s: Text) -> text_type: ...
@@ -0,0 +1,8 @@
from typing import Text, Union
from . import Markup
from ._compat import text_type
def escape(s: Union[Markup, Text]) -> Markup: ...
def escape_silent(s: Union[None, Markup, Text]) -> Markup: ...
def soft_unicode(s: Text) -> text_type: ...
+2
View File
@@ -0,0 +1,2 @@
version = "0.1"
python2 = true
+63
View File
@@ -0,0 +1,63 @@
import sys
from typing import Callable, FrozenSet, Tuple
from .connections import Connection as _Connection
from .constants import FIELD_TYPE as FIELD_TYPE
from .converters import escape_dict as escape_dict, escape_sequence as escape_sequence, escape_string as escape_string
from .err import (
DatabaseError as DatabaseError,
DataError as DataError,
Error as Error,
IntegrityError as IntegrityError,
InterfaceError as InterfaceError,
InternalError as InternalError,
MySQLError as MySQLError,
NotSupportedError as NotSupportedError,
OperationalError as OperationalError,
ProgrammingError as ProgrammingError,
Warning as Warning,
)
from .times import (
Date as Date,
DateFromTicks as DateFromTicks,
Time as Time,
TimeFromTicks as TimeFromTicks,
Timestamp as Timestamp,
TimestampFromTicks as TimestampFromTicks,
)
threadsafety: int
apilevel: str
paramstyle: str
class DBAPISet(FrozenSet[int]):
def __ne__(self, other) -> bool: ...
def __eq__(self, other) -> bool: ...
def __hash__(self) -> int: ...
STRING: DBAPISet
BINARY: DBAPISet
NUMBER: DBAPISet
DATE: DBAPISet
TIME: DBAPISet
TIMESTAMP: DBAPISet
DATETIME: DBAPISet
ROWID: DBAPISet
if sys.version_info >= (3, 0):
def Binary(x) -> bytes: ...
else:
def Binary(x) -> bytearray: ...
def Connect(*args, **kwargs) -> _Connection: ...
def get_client_info() -> str: ...
connect: Callable[..., _Connection]
Connection: Callable[..., _Connection]
__version__: str
version_info: Tuple[int, int, int, str, int]
NULL: str
def thread_safe() -> bool: ...
def install_as_MySQLdb() -> None: ...
+16
View File
@@ -0,0 +1,16 @@
from typing import Any
MBLENGTH: Any
class Charset:
is_default: Any
def __init__(self, id, name, collation, is_default): ...
class Charsets:
def __init__(self): ...
def add(self, c): ...
def by_id(self, id): ...
def by_name(self, name): ...
def charset_by_name(name): ...
def charset_by_id(id): ...
+172
View File
@@ -0,0 +1,172 @@
from socket import SocketType
from typing import Any, AnyStr, Mapping, Optional, Tuple, Type
from .charset import charset_by_id as charset_by_id, charset_by_name as charset_by_name
from .constants import CLIENT as CLIENT, COMMAND as COMMAND, FIELD_TYPE as FIELD_TYPE, SERVER_STATUS as SERVER_STATUS
from .cursors import Cursor
from .util import byte2int as byte2int, int2byte as int2byte
SSL_ENABLED: Any
DEFAULT_USER: Any
DEBUG: Any
DEFAULT_CHARSET: Any
def dump_packet(data): ...
def pack_int24(n): ...
def lenenc_int(i: int) -> bytes: ...
class MysqlPacket:
connection: Any
def __init__(self, data, encoding): ...
def get_all_data(self): ...
def read(self, size): ...
def read_all(self): ...
def advance(self, length): ...
def rewind(self, position: int = ...): ...
def get_bytes(self, position, length: int = ...): ...
def read_string(self) -> bytes: ...
def read_uint8(self) -> Any: ...
def read_uint16(self) -> Any: ...
def read_uint24(self) -> Any: ...
def read_uint32(self) -> Any: ...
def read_uint64(self) -> Any: ...
def read_length_encoded_integer(self) -> int: ...
def read_length_coded_string(self) -> bytes: ...
def read_struct(self, fmt: str) -> Tuple[Any, ...]: ...
def is_ok_packet(self) -> bool: ...
def is_eof_packet(self) -> bool: ...
def is_auth_switch_request(self) -> bool: ...
def is_extra_auth_data(self) -> bool: ...
def is_resultset_packet(self) -> bool: ...
def is_load_local_packet(self) -> bool: ...
def is_error_packet(self) -> bool: ...
def check_error(self): ...
def raise_for_error(self) -> None: ...
def dump(self): ...
class FieldDescriptorPacket(MysqlPacket):
def __init__(self, data, encoding): ...
def description(self): ...
def get_column_length(self): ...
class Connection:
ssl: Any
host: Any
port: Any
user: Any
password: Any
db: Any
unix_socket: Any
bind_address: Any
charset: Any
use_unicode: Any
client_flag: Any
cursorclass: Any
connect_timeout: Any
messages: Any
encoders: Any
decoders: Any
host_info: Any
sql_mode: Any
init_command: Any
max_allowed_packet: int
server_public_key: bytes
def __init__(
self,
host: Optional[str] = ...,
user: Optional[Any] = ...,
password: str = ...,
database: Optional[Any] = ...,
port: int = ...,
unix_socket: Optional[Any] = ...,
charset: str = ...,
sql_mode: Optional[Any] = ...,
read_default_file: Optional[Any] = ...,
conv=...,
use_unicode: Optional[bool] = ...,
client_flag: int = ...,
cursorclass: Optional[Type[Cursor]] = ...,
init_command: Optional[Any] = ...,
connect_timeout: Optional[int] = ...,
ssl: Optional[Mapping] = ...,
read_default_group: Optional[Any] = ...,
compress: Optional[Any] = ...,
named_pipe: Optional[Any] = ...,
autocommit: Optional[bool] = ...,
db: Optional[Any] = ...,
passwd: Optional[Any] = ...,
local_infile: Optional[Any] = ...,
max_allowed_packet: int = ...,
defer_connect: Optional[bool] = ...,
auth_plugin_map: Optional[Mapping] = ...,
read_timeout: Optional[float] = ...,
write_timeout: Optional[float] = ...,
bind_address: Optional[Any] = ...,
binary_prefix: Optional[bool] = ...,
program_name: Optional[Any] = ...,
server_public_key: Optional[bytes] = ...,
): ...
socket: Any
rfile: Any
wfile: Any
def close(self) -> None: ...
@property
def open(self) -> bool: ...
def autocommit(self, value) -> None: ...
def get_autocommit(self) -> bool: ...
def commit(self) -> None: ...
def begin(self) -> None: ...
def rollback(self) -> None: ...
def select_db(self, db) -> None: ...
def escape(self, obj, mapping: Optional[Mapping] = ...): ...
def literal(self, obj): ...
def escape_string(self, s: AnyStr) -> AnyStr: ...
def cursor(self, cursor: Optional[Type[Cursor]] = ...) -> Cursor: ...
def query(self, sql, unbuffered: bool = ...) -> int: ...
def next_result(self, unbuffered: bool = ...) -> int: ...
def affected_rows(self): ...
def kill(self, thread_id): ...
def ping(self, reconnect: bool = ...) -> None: ...
def set_charset(self, charset) -> None: ...
def connect(self, sock: Optional[SocketType] = ...) -> None: ...
def write_packet(self, payload) -> None: ...
def _read_packet(self, packet_type=...): ...
def insert_id(self): ...
def thread_id(self): ...
def character_set_name(self): ...
def get_host_info(self): ...
def get_proto_info(self): ...
def get_server_info(self): ...
def show_warnings(self): ...
Warning: Any
Error: Any
InterfaceError: Any
DatabaseError: Any
DataError: Any
OperationalError: Any
IntegrityError: Any
InternalError: Any
ProgrammingError: Any
NotSupportedError: Any
class MySQLResult:
connection: Any
affected_rows: Any
insert_id: Any
server_status: Any
warning_count: Any
message: Any
field_count: Any
description: Any
rows: Any
has_next: Any
def __init__(self, connection: Connection) -> None: ...
first_packet: Any
def read(self) -> None: ...
def init_unbuffered_query(self) -> None: ...
class LoadLocalFile:
filename: Any
connection: Connection
def __init__(self, filename: Any, connection: Connection) -> None: ...
def send_data(self) -> None: ...
@@ -0,0 +1,18 @@
LONG_PASSWORD: int
FOUND_ROWS: int
LONG_FLAG: int
CONNECT_WITH_DB: int
NO_SCHEMA: int
COMPRESS: int
ODBC: int
LOCAL_FILES: int
IGNORE_SPACE: int
PROTOCOL_41: int
INTERACTIVE: int
SSL: int
IGNORE_SIGPIPE: int
TRANSACTIONS: int
SECURE_CONNECTION: int
MULTI_STATEMENTS: int
MULTI_RESULTS: int
CAPABILITIES: int
@@ -0,0 +1,22 @@
COM_SLEEP: int
COM_QUIT: int
COM_INIT_DB: int
COM_QUERY: int
COM_FIELD_LIST: int
COM_CREATE_DB: int
COM_DROP_DB: int
COM_REFRESH: int
COM_SHUTDOWN: int
COM_STATISTICS: int
COM_PROCESS_INFO: int
COM_CONNECT: int
COM_PROCESS_KILL: int
COM_DEBUG: int
COM_PING: int
COM_TIME: int
COM_DELAYED_INSERT: int
COM_CHANGE_USER: int
COM_BINLOG_DUMP: int
COM_TABLE_DUMP: int
COM_CONNECT_OUT: int
COM_REGISTER_SLAVE: int
+471
View File
@@ -0,0 +1,471 @@
ERROR_FIRST: int
HASHCHK: int
NISAMCHK: int
NO: int
YES: int
CANT_CREATE_FILE: int
CANT_CREATE_TABLE: int
CANT_CREATE_DB: int
DB_CREATE_EXISTS: int
DB_DROP_EXISTS: int
DB_DROP_DELETE: int
DB_DROP_RMDIR: int
CANT_DELETE_FILE: int
CANT_FIND_SYSTEM_REC: int
CANT_GET_STAT: int
CANT_GET_WD: int
CANT_LOCK: int
CANT_OPEN_FILE: int
FILE_NOT_FOUND: int
CANT_READ_DIR: int
CANT_SET_WD: int
CHECKREAD: int
DISK_FULL: int
DUP_KEY: int
ERROR_ON_CLOSE: int
ERROR_ON_READ: int
ERROR_ON_RENAME: int
ERROR_ON_WRITE: int
FILE_USED: int
FILSORT_ABORT: int
FORM_NOT_FOUND: int
GET_ERRNO: int
ILLEGAL_HA: int
KEY_NOT_FOUND: int
NOT_FORM_FILE: int
NOT_KEYFILE: int
OLD_KEYFILE: int
OPEN_AS_READONLY: int
OUTOFMEMORY: int
OUT_OF_SORTMEMORY: int
UNEXPECTED_EOF: int
CON_COUNT_ERROR: int
OUT_OF_RESOURCES: int
BAD_HOST_ERROR: int
HANDSHAKE_ERROR: int
DBACCESS_DENIED_ERROR: int
ACCESS_DENIED_ERROR: int
NO_DB_ERROR: int
UNKNOWN_COM_ERROR: int
BAD_NULL_ERROR: int
BAD_DB_ERROR: int
TABLE_EXISTS_ERROR: int
BAD_TABLE_ERROR: int
NON_UNIQ_ERROR: int
SERVER_SHUTDOWN: int
BAD_FIELD_ERROR: int
WRONG_FIELD_WITH_GROUP: int
WRONG_GROUP_FIELD: int
WRONG_SUM_SELECT: int
WRONG_VALUE_COUNT: int
TOO_LONG_IDENT: int
DUP_FIELDNAME: int
DUP_KEYNAME: int
DUP_ENTRY: int
WRONG_FIELD_SPEC: int
PARSE_ERROR: int
EMPTY_QUERY: int
NONUNIQ_TABLE: int
INVALID_DEFAULT: int
MULTIPLE_PRI_KEY: int
TOO_MANY_KEYS: int
TOO_MANY_KEY_PARTS: int
TOO_LONG_KEY: int
KEY_COLUMN_DOES_NOT_EXITS: int
BLOB_USED_AS_KEY: int
TOO_BIG_FIELDLENGTH: int
WRONG_AUTO_KEY: int
READY: int
NORMAL_SHUTDOWN: int
GOT_SIGNAL: int
SHUTDOWN_COMPLETE: int
FORCING_CLOSE: int
IPSOCK_ERROR: int
NO_SUCH_INDEX: int
WRONG_FIELD_TERMINATORS: int
BLOBS_AND_NO_TERMINATED: int
TEXTFILE_NOT_READABLE: int
FILE_EXISTS_ERROR: int
LOAD_INFO: int
ALTER_INFO: int
WRONG_SUB_KEY: int
CANT_REMOVE_ALL_FIELDS: int
CANT_DROP_FIELD_OR_KEY: int
INSERT_INFO: int
UPDATE_TABLE_USED: int
NO_SUCH_THREAD: int
KILL_DENIED_ERROR: int
NO_TABLES_USED: int
TOO_BIG_SET: int
NO_UNIQUE_LOGFILE: int
TABLE_NOT_LOCKED_FOR_WRITE: int
TABLE_NOT_LOCKED: int
BLOB_CANT_HAVE_DEFAULT: int
WRONG_DB_NAME: int
WRONG_TABLE_NAME: int
TOO_BIG_SELECT: int
UNKNOWN_ERROR: int
UNKNOWN_PROCEDURE: int
WRONG_PARAMCOUNT_TO_PROCEDURE: int
WRONG_PARAMETERS_TO_PROCEDURE: int
UNKNOWN_TABLE: int
FIELD_SPECIFIED_TWICE: int
INVALID_GROUP_FUNC_USE: int
UNSUPPORTED_EXTENSION: int
TABLE_MUST_HAVE_COLUMNS: int
RECORD_FILE_FULL: int
UNKNOWN_CHARACTER_SET: int
TOO_MANY_TABLES: int
TOO_MANY_FIELDS: int
TOO_BIG_ROWSIZE: int
STACK_OVERRUN: int
WRONG_OUTER_JOIN: int
NULL_COLUMN_IN_INDEX: int
CANT_FIND_UDF: int
CANT_INITIALIZE_UDF: int
UDF_NO_PATHS: int
UDF_EXISTS: int
CANT_OPEN_LIBRARY: int
CANT_FIND_DL_ENTRY: int
FUNCTION_NOT_DEFINED: int
HOST_IS_BLOCKED: int
HOST_NOT_PRIVILEGED: int
PASSWORD_ANONYMOUS_USER: int
PASSWORD_NOT_ALLOWED: int
PASSWORD_NO_MATCH: int
UPDATE_INFO: int
CANT_CREATE_THREAD: int
WRONG_VALUE_COUNT_ON_ROW: int
CANT_REOPEN_TABLE: int
INVALID_USE_OF_NULL: int
REGEXP_ERROR: int
MIX_OF_GROUP_FUNC_AND_FIELDS: int
NONEXISTING_GRANT: int
TABLEACCESS_DENIED_ERROR: int
COLUMNACCESS_DENIED_ERROR: int
ILLEGAL_GRANT_FOR_TABLE: int
GRANT_WRONG_HOST_OR_USER: int
NO_SUCH_TABLE: int
NONEXISTING_TABLE_GRANT: int
NOT_ALLOWED_COMMAND: int
SYNTAX_ERROR: int
DELAYED_CANT_CHANGE_LOCK: int
TOO_MANY_DELAYED_THREADS: int
ABORTING_CONNECTION: int
NET_PACKET_TOO_LARGE: int
NET_READ_ERROR_FROM_PIPE: int
NET_FCNTL_ERROR: int
NET_PACKETS_OUT_OF_ORDER: int
NET_UNCOMPRESS_ERROR: int
NET_READ_ERROR: int
NET_READ_INTERRUPTED: int
NET_ERROR_ON_WRITE: int
NET_WRITE_INTERRUPTED: int
TOO_LONG_STRING: int
TABLE_CANT_HANDLE_BLOB: int
TABLE_CANT_HANDLE_AUTO_INCREMENT: int
DELAYED_INSERT_TABLE_LOCKED: int
WRONG_COLUMN_NAME: int
WRONG_KEY_COLUMN: int
WRONG_MRG_TABLE: int
DUP_UNIQUE: int
BLOB_KEY_WITHOUT_LENGTH: int
PRIMARY_CANT_HAVE_NULL: int
TOO_MANY_ROWS: int
REQUIRES_PRIMARY_KEY: int
NO_RAID_COMPILED: int
UPDATE_WITHOUT_KEY_IN_SAFE_MODE: int
KEY_DOES_NOT_EXITS: int
CHECK_NO_SUCH_TABLE: int
CHECK_NOT_IMPLEMENTED: int
CANT_DO_THIS_DURING_AN_TRANSACTION: int
ERROR_DURING_COMMIT: int
ERROR_DURING_ROLLBACK: int
ERROR_DURING_FLUSH_LOGS: int
ERROR_DURING_CHECKPOINT: int
NEW_ABORTING_CONNECTION: int
DUMP_NOT_IMPLEMENTED: int
FLUSH_MASTER_BINLOG_CLOSED: int
INDEX_REBUILD: int
MASTER: int
MASTER_NET_READ: int
MASTER_NET_WRITE: int
FT_MATCHING_KEY_NOT_FOUND: int
LOCK_OR_ACTIVE_TRANSACTION: int
UNKNOWN_SYSTEM_VARIABLE: int
CRASHED_ON_USAGE: int
CRASHED_ON_REPAIR: int
WARNING_NOT_COMPLETE_ROLLBACK: int
TRANS_CACHE_FULL: int
SLAVE_MUST_STOP: int
SLAVE_NOT_RUNNING: int
BAD_SLAVE: int
MASTER_INFO: int
SLAVE_THREAD: int
TOO_MANY_USER_CONNECTIONS: int
SET_CONSTANTS_ONLY: int
LOCK_WAIT_TIMEOUT: int
LOCK_TABLE_FULL: int
READ_ONLY_TRANSACTION: int
DROP_DB_WITH_READ_LOCK: int
CREATE_DB_WITH_READ_LOCK: int
WRONG_ARGUMENTS: int
NO_PERMISSION_TO_CREATE_USER: int
UNION_TABLES_IN_DIFFERENT_DIR: int
LOCK_DEADLOCK: int
TABLE_CANT_HANDLE_FT: int
CANNOT_ADD_FOREIGN: int
NO_REFERENCED_ROW: int
ROW_IS_REFERENCED: int
CONNECT_TO_MASTER: int
QUERY_ON_MASTER: int
ERROR_WHEN_EXECUTING_COMMAND: int
WRONG_USAGE: int
WRONG_NUMBER_OF_COLUMNS_IN_SELECT: int
CANT_UPDATE_WITH_READLOCK: int
MIXING_NOT_ALLOWED: int
DUP_ARGUMENT: int
USER_LIMIT_REACHED: int
SPECIFIC_ACCESS_DENIED_ERROR: int
LOCAL_VARIABLE: int
GLOBAL_VARIABLE: int
NO_DEFAULT: int
WRONG_VALUE_FOR_VAR: int
WRONG_TYPE_FOR_VAR: int
VAR_CANT_BE_READ: int
CANT_USE_OPTION_HERE: int
NOT_SUPPORTED_YET: int
MASTER_FATAL_ERROR_READING_BINLOG: int
SLAVE_IGNORED_TABLE: int
INCORRECT_GLOBAL_LOCAL_VAR: int
WRONG_FK_DEF: int
KEY_REF_DO_NOT_MATCH_TABLE_REF: int
OPERAND_COLUMNS: int
SUBQUERY_NO_1_ROW: int
UNKNOWN_STMT_HANDLER: int
CORRUPT_HELP_DB: int
CYCLIC_REFERENCE: int
AUTO_CONVERT: int
ILLEGAL_REFERENCE: int
DERIVED_MUST_HAVE_ALIAS: int
SELECT_REDUCED: int
TABLENAME_NOT_ALLOWED_HERE: int
NOT_SUPPORTED_AUTH_MODE: int
SPATIAL_CANT_HAVE_NULL: int
COLLATION_CHARSET_MISMATCH: int
SLAVE_WAS_RUNNING: int
SLAVE_WAS_NOT_RUNNING: int
TOO_BIG_FOR_UNCOMPRESS: int
ZLIB_Z_MEM_ERROR: int
ZLIB_Z_BUF_ERROR: int
ZLIB_Z_DATA_ERROR: int
CUT_VALUE_GROUP_CONCAT: int
WARN_TOO_FEW_RECORDS: int
WARN_TOO_MANY_RECORDS: int
WARN_NULL_TO_NOTNULL: int
WARN_DATA_OUT_OF_RANGE: int
WARN_DATA_TRUNCATED: int
WARN_USING_OTHER_HANDLER: int
CANT_AGGREGATE_2COLLATIONS: int
DROP_USER: int
REVOKE_GRANTS: int
CANT_AGGREGATE_3COLLATIONS: int
CANT_AGGREGATE_NCOLLATIONS: int
VARIABLE_IS_NOT_STRUCT: int
UNKNOWN_COLLATION: int
SLAVE_IGNORED_SSL_PARAMS: int
SERVER_IS_IN_SECURE_AUTH_MODE: int
WARN_FIELD_RESOLVED: int
BAD_SLAVE_UNTIL_COND: int
MISSING_SKIP_SLAVE: int
UNTIL_COND_IGNORED: int
WRONG_NAME_FOR_INDEX: int
WRONG_NAME_FOR_CATALOG: int
WARN_QC_RESIZE: int
BAD_FT_COLUMN: int
UNKNOWN_KEY_CACHE: int
WARN_HOSTNAME_WONT_WORK: int
UNKNOWN_STORAGE_ENGINE: int
WARN_DEPRECATED_SYNTAX: int
NON_UPDATABLE_TABLE: int
FEATURE_DISABLED: int
OPTION_PREVENTS_STATEMENT: int
DUPLICATED_VALUE_IN_TYPE: int
TRUNCATED_WRONG_VALUE: int
TOO_MUCH_AUTO_TIMESTAMP_COLS: int
INVALID_ON_UPDATE: int
UNSUPPORTED_PS: int
GET_ERRMSG: int
GET_TEMPORARY_ERRMSG: int
UNKNOWN_TIME_ZONE: int
WARN_INVALID_TIMESTAMP: int
INVALID_CHARACTER_STRING: int
WARN_ALLOWED_PACKET_OVERFLOWED: int
CONFLICTING_DECLARATIONS: int
SP_NO_RECURSIVE_CREATE: int
SP_ALREADY_EXISTS: int
SP_DOES_NOT_EXIST: int
SP_DROP_FAILED: int
SP_STORE_FAILED: int
SP_LILABEL_MISMATCH: int
SP_LABEL_REDEFINE: int
SP_LABEL_MISMATCH: int
SP_UNINIT_VAR: int
SP_BADSELECT: int
SP_BADRETURN: int
SP_BADSTATEMENT: int
UPDATE_LOG_DEPRECATED_IGNORED: int
UPDATE_LOG_DEPRECATED_TRANSLATED: int
QUERY_INTERRUPTED: int
SP_WRONG_NO_OF_ARGS: int
SP_COND_MISMATCH: int
SP_NORETURN: int
SP_NORETURNEND: int
SP_BAD_CURSOR_QUERY: int
SP_BAD_CURSOR_SELECT: int
SP_CURSOR_MISMATCH: int
SP_CURSOR_ALREADY_OPEN: int
SP_CURSOR_NOT_OPEN: int
SP_UNDECLARED_VAR: int
SP_WRONG_NO_OF_FETCH_ARGS: int
SP_FETCH_NO_DATA: int
SP_DUP_PARAM: int
SP_DUP_VAR: int
SP_DUP_COND: int
SP_DUP_CURS: int
SP_CANT_ALTER: int
SP_SUBSELECT_NYI: int
STMT_NOT_ALLOWED_IN_SF_OR_TRG: int
SP_VARCOND_AFTER_CURSHNDLR: int
SP_CURSOR_AFTER_HANDLER: int
SP_CASE_NOT_FOUND: int
FPARSER_TOO_BIG_FILE: int
FPARSER_BAD_HEADER: int
FPARSER_EOF_IN_COMMENT: int
FPARSER_ERROR_IN_PARAMETER: int
FPARSER_EOF_IN_UNKNOWN_PARAMETER: int
VIEW_NO_EXPLAIN: int
FRM_UNKNOWN_TYPE: int
WRONG_OBJECT: int
NONUPDATEABLE_COLUMN: int
VIEW_SELECT_DERIVED: int
VIEW_SELECT_CLAUSE: int
VIEW_SELECT_VARIABLE: int
VIEW_SELECT_TMPTABLE: int
VIEW_WRONG_LIST: int
WARN_VIEW_MERGE: int
WARN_VIEW_WITHOUT_KEY: int
VIEW_INVALID: int
SP_NO_DROP_SP: int
SP_GOTO_IN_HNDLR: int
TRG_ALREADY_EXISTS: int
TRG_DOES_NOT_EXIST: int
TRG_ON_VIEW_OR_TEMP_TABLE: int
TRG_CANT_CHANGE_ROW: int
TRG_NO_SUCH_ROW_IN_TRG: int
NO_DEFAULT_FOR_FIELD: int
DIVISION_BY_ZERO: int
TRUNCATED_WRONG_VALUE_FOR_FIELD: int
ILLEGAL_VALUE_FOR_TYPE: int
VIEW_NONUPD_CHECK: int
VIEW_CHECK_FAILED: int
PROCACCESS_DENIED_ERROR: int
RELAY_LOG_FAIL: int
PASSWD_LENGTH: int
UNKNOWN_TARGET_BINLOG: int
IO_ERR_LOG_INDEX_READ: int
BINLOG_PURGE_PROHIBITED: int
FSEEK_FAIL: int
BINLOG_PURGE_FATAL_ERR: int
LOG_IN_USE: int
LOG_PURGE_UNKNOWN_ERR: int
RELAY_LOG_INIT: int
NO_BINARY_LOGGING: int
RESERVED_SYNTAX: int
WSAS_FAILED: int
DIFF_GROUPS_PROC: int
NO_GROUP_FOR_PROC: int
ORDER_WITH_PROC: int
LOGGING_PROHIBIT_CHANGING_OF: int
NO_FILE_MAPPING: int
WRONG_MAGIC: int
PS_MANY_PARAM: int
KEY_PART_0: int
VIEW_CHECKSUM: int
VIEW_MULTIUPDATE: int
VIEW_NO_INSERT_FIELD_LIST: int
VIEW_DELETE_MERGE_VIEW: int
CANNOT_USER: int
XAER_NOTA: int
XAER_INVAL: int
XAER_RMFAIL: int
XAER_OUTSIDE: int
XAER_RMERR: int
XA_RBROLLBACK: int
NONEXISTING_PROC_GRANT: int
PROC_AUTO_GRANT_FAIL: int
PROC_AUTO_REVOKE_FAIL: int
DATA_TOO_LONG: int
SP_BAD_SQLSTATE: int
STARTUP: int
LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR: int
CANT_CREATE_USER_WITH_GRANT: int
WRONG_VALUE_FOR_TYPE: int
TABLE_DEF_CHANGED: int
SP_DUP_HANDLER: int
SP_NOT_VAR_ARG: int
SP_NO_RETSET: int
CANT_CREATE_GEOMETRY_OBJECT: int
FAILED_ROUTINE_BREAK_BINLOG: int
BINLOG_UNSAFE_ROUTINE: int
BINLOG_CREATE_ROUTINE_NEED_SUPER: int
EXEC_STMT_WITH_OPEN_CURSOR: int
STMT_HAS_NO_OPEN_CURSOR: int
COMMIT_NOT_ALLOWED_IN_SF_OR_TRG: int
NO_DEFAULT_FOR_VIEW_FIELD: int
SP_NO_RECURSION: int
TOO_BIG_SCALE: int
TOO_BIG_PRECISION: int
M_BIGGER_THAN_D: int
WRONG_LOCK_OF_SYSTEM_TABLE: int
CONNECT_TO_FOREIGN_DATA_SOURCE: int
QUERY_ON_FOREIGN_DATA_SOURCE: int
FOREIGN_DATA_SOURCE_DOESNT_EXIST: int
FOREIGN_DATA_STRING_INVALID_CANT_CREATE: int
FOREIGN_DATA_STRING_INVALID: int
CANT_CREATE_FEDERATED_TABLE: int
TRG_IN_WRONG_SCHEMA: int
STACK_OVERRUN_NEED_MORE: int
TOO_LONG_BODY: int
WARN_CANT_DROP_DEFAULT_KEYCACHE: int
TOO_BIG_DISPLAYWIDTH: int
XAER_DUPID: int
DATETIME_FUNCTION_OVERFLOW: int
CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG: int
VIEW_PREVENT_UPDATE: int
PS_NO_RECURSION: int
SP_CANT_SET_AUTOCOMMIT: int
MALFORMED_DEFINER: int
VIEW_FRM_NO_USER: int
VIEW_OTHER_USER: int
NO_SUCH_USER: int
FORBID_SCHEMA_CHANGE: int
ROW_IS_REFERENCED_2: int
NO_REFERENCED_ROW_2: int
SP_BAD_VAR_SHADOW: int
TRG_NO_DEFINER: int
OLD_FILE_FORMAT: int
SP_RECURSION_LIMIT: int
SP_PROC_TABLE_CORRUPT: int
SP_WRONG_NAME: int
TABLE_NEEDS_UPGRADE: int
SP_NO_AGGREGATE: int
MAX_PREPARED_STMT_COUNT_REACHED: int
VIEW_RECURSIVE: int
NON_GROUPING_FIELD_USED: int
TABLE_CANT_HANDLE_SPKEYS: int
NO_TRIGGERS_ON_SYSTEM_SCHEMA: int
USERNAME: int
HOSTNAME: int
WRONG_STRING_LENGTH: int
ERROR_LAST: int
@@ -0,0 +1,29 @@
DECIMAL: int
TINY: int
SHORT: int
LONG: int
FLOAT: int
DOUBLE: int
NULL: int
TIMESTAMP: int
LONGLONG: int
INT24: int
DATE: int
TIME: int
DATETIME: int
YEAR: int
NEWDATE: int
VARCHAR: int
BIT: int
NEWDECIMAL: int
ENUM: int
SET: int
TINY_BLOB: int
MEDIUM_BLOB: int
LONG_BLOB: int
BLOB: int
VAR_STRING: int
STRING: int
GEOMETRY: int
CHAR: int
INTERVAL: int
+17
View File
@@ -0,0 +1,17 @@
from typing import Any
NOT_NULL: Any
PRI_KEY: Any
UNIQUE_KEY: Any
MULTIPLE_KEY: Any
BLOB: Any
UNSIGNED: Any
ZEROFILL: Any
BINARY: Any
ENUM: Any
AUTO_INCREMENT: Any
TIMESTAMP: Any
SET: Any
PART_KEY: Any
GROUP: Any
UNIQUE: Any
@@ -0,0 +1,10 @@
SERVER_STATUS_IN_TRANS: int
SERVER_STATUS_AUTOCOMMIT: int
SERVER_MORE_RESULTS_EXISTS: int
SERVER_QUERY_NO_GOOD_INDEX_USED: int
SERVER_QUERY_NO_INDEX_USED: int
SERVER_STATUS_CURSOR_EXISTS: int
SERVER_STATUS_LAST_ROW_SENT: int
SERVER_STATUS_DB_DROPPED: int
SERVER_STATUS_NO_BACKSLASH_ESCAPES: int
SERVER_STATUS_METADATA_CHANGED: int

Some files were not shown because too many files have changed in this diff Show More