2023-12-22 20:37:39 -04:00
|
|
|
from typing import Final
|
|
|
|
|
|
|
|
from .formatting import (
|
2023-12-23 13:08:10 -04:00
|
|
|
SIG_END_MARKER,
|
2023-12-22 20:37:39 -04:00
|
|
|
c_repr,
|
|
|
|
docstring_for_c_string,
|
2023-12-23 13:08:10 -04:00
|
|
|
format_escape,
|
2023-12-22 20:37:39 -04:00
|
|
|
indent_all_lines,
|
2023-12-23 13:08:10 -04:00
|
|
|
normalize_snippet,
|
2023-12-22 20:37:39 -04:00
|
|
|
pprint_words,
|
|
|
|
suffix_all_lines,
|
2023-12-23 13:08:10 -04:00
|
|
|
wrap_declarations,
|
2023-12-22 20:37:39 -04:00
|
|
|
wrapped_c_string_literal,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
# Formatting helpers
|
2023-12-23 13:08:10 -04:00
|
|
|
"SIG_END_MARKER",
|
2023-12-22 20:37:39 -04:00
|
|
|
"c_repr",
|
|
|
|
"docstring_for_c_string",
|
2023-12-23 13:08:10 -04:00
|
|
|
"format_escape",
|
2023-12-22 20:37:39 -04:00
|
|
|
"indent_all_lines",
|
2023-12-23 13:08:10 -04:00
|
|
|
"normalize_snippet",
|
2023-12-22 20:37:39 -04:00
|
|
|
"pprint_words",
|
|
|
|
"suffix_all_lines",
|
2023-12-23 13:08:10 -04:00
|
|
|
"wrap_declarations",
|
2023-12-22 20:37:39 -04:00
|
|
|
"wrapped_c_string_literal",
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
CLINIC_PREFIX: Final = "__clinic_"
|
|
|
|
CLINIC_PREFIXED_ARGS: Final = frozenset(
|
|
|
|
{
|
|
|
|
"_keywords",
|
|
|
|
"_parser",
|
|
|
|
"args",
|
|
|
|
"argsbuf",
|
|
|
|
"fastargs",
|
|
|
|
"kwargs",
|
|
|
|
"kwnames",
|
|
|
|
"nargs",
|
|
|
|
"noptargs",
|
|
|
|
"return_value",
|
|
|
|
}
|
|
|
|
)
|