mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 04:35:24 +00:00
Move error messages into docstrings
This commit is contained in:
parent
8be5351452
commit
5c3487dc8a
@ -108,12 +108,12 @@ def start():
|
||||
notice=notice,
|
||||
super_class=super_class,
|
||||
code=code,
|
||||
name="\"{}\"".format(name),
|
||||
docstring='"""{}"""'.format(name),
|
||||
sub_classes="".join([sub_class_template.format(
|
||||
sub_class=k[0],
|
||||
super_class=super_class,
|
||||
id="\"{}\"".format(k[1]),
|
||||
message="\"{}\"".format(k[2])
|
||||
docstring='"""{}"""'.format(k[2])
|
||||
) for k in sub_classes])
|
||||
)
|
||||
|
||||
|
@ -4,8 +4,10 @@ from ..error import Error
|
||||
|
||||
|
||||
class {super_class}(Error):
|
||||
{docstring}
|
||||
CODE = {code}
|
||||
NAME = {name}
|
||||
""":obj:`int`: Error Code"""
|
||||
NAME = __doc__
|
||||
|
||||
|
||||
{sub_classes}
|
@ -1,5 +1,7 @@
|
||||
class {sub_class}({super_class}):
|
||||
{docstring}
|
||||
ID = {id}
|
||||
MESSAGE = {message}
|
||||
""":obj:`str`: Error ID"""
|
||||
MESSAGE = __doc__
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user