mirror of
https://github.com/LonamiWebs/Telethon
synced 2025-08-24 02:47:18 +00:00
16 lines
437 B
Python
16 lines
437 B
Python
|
from telethon_generator.parsers import parse_errors
|
||
|
from telethon_generator.generators import generate_errors
|
||
|
|
||
|
|
||
|
INPUT_JSON = 'errors.json'
|
||
|
INPUT_DESCRIPTIONS = 'error_descriptions'
|
||
|
OUTPUT = '../telethon/errors/rpc_error_list.py'
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
with open(OUTPUT, 'w', encoding='utf-8') as file:
|
||
|
generate_errors(
|
||
|
errors=list(parse_errors(INPUT_JSON, INPUT_DESCRIPTIONS)),
|
||
|
f=file
|
||
|
)
|