/
githubmirror
/
cpython
Обзор
Документация
Войти
/
githubmirror
/
cpython
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
Tools/clinic/libclinic/__init__.py
103 строки
2 KB
Serhiy Storchaka
gh-155207: Add --dry-run and --diff options to Argument Clinic (GH-155208)
05 авг 2026, 10:28
Не верифицирован
05 авг 2026, 10:28
3874ad1
Код
Авторство
О чём код?
from typing import Final from .errors import ( ClinicError, warn, fail, ) from .formatting import ( SIG_END_MARKER, c_str_repr, c_bytes_repr, c_unichar_repr, docstring_for_c_string, format_escape, indent_all_lines, linear_format, normalize_snippet, pprint_words, suffix_all_lines, wrap_declarations, wrapped_c_string_literal, ) from .identifiers import ( ensure_legal_c_identifier, is_legal_c_identifier, is_legal_py_identifier, ) from .utils import ( FileChange, FileWriter, FormatCounterFormatter, NULL, NullType, Sentinels, VersionTuple, compute_checksum, create_regex, read_file, unknown, unspecified, write_file, ) __all__ = [ # Error handling "ClinicError", "warn", "fail", # Formatting helpers "SIG_END_MARKER", "c_str_repr", "c_bytes_repr", "c_unichar_repr", "docstring_for_c_string", "format_escape", "indent_all_lines", "linear_format", "normalize_snippet", "pprint_words", "suffix_all_lines", "wrap_declarations", "wrapped_c_string_literal", # Identifier helpers "ensure_legal_c_identifier", "is_legal_c_identifier", "is_legal_py_identifier", # Utility functions "FileChange", "FileWriter", "FormatCounterFormatter", "NULL", "NullType", "Sentinels", "VersionTuple", "compute_checksum", "create_regex", "read_file", "unknown", "unspecified", "write_file", ] CLINIC_PREFIX: Final = "__clinic_" CLINIC_PREFIXED_ARGS: Final = frozenset( { "_keywords", "_parser", "args", "argsbuf", "fastargs", "kwargs", "kwds", "kwnames", "nargs", "noptargs", "return_value", } )