codekingpro/portable-devtools
115k
1import re
2from _typeshed import StrOrBytesPath
3from collections.abc import Mapping
4from typing import Final
5
6routine_start_re: Final[re.Pattern[str]] = ...
7routine_end_re: Final[re.Pattern[str]] = ...
8function_start_re: Final[re.Pattern[str]] = ...
9template_re: Final[re.Pattern[str]] = ...
10named_re: Final[re.Pattern[str]] = ...
11list_re: Final[re.Pattern[str]] = ...
12item_re: Final[re.Pattern[str]] = ...
13template_name_re: Final[re.Pattern[str]] = ...
14include_src_re: Final[re.Pattern[str]] = ...
15
16def parse_structure(astr: str) -> list[tuple[int, int]]: ...
17def find_repl_patterns(astr: str) -> dict[str, str]: ...
18def find_and_remove_repl_patterns(astr: str) -> tuple[str, dict[str, str]]: ...
19def conv(astr: str) -> str: ...
20
21#
22def unique_key(adict: Mapping[str, object]) -> str: ...
23def expand_sub(substr: str, names: dict[str, str]) -> str: ...
24def process_str(allstr: str) -> str: ...
25
26#
27def resolve_includes(source: StrOrBytesPath) -> list[str]: ...
28def process_file(source: StrOrBytesPath) -> str: ...
29 