mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-12-01 01:57:51 +00:00
Don't inherit from Object
This commit is contained in:
parent
44a3a4d69b
commit
c54730b8ab
@ -144,8 +144,11 @@ def start():
|
|||||||
open("{}/source/pyrogram.tl".format(HOME), encoding="utf-8") as pyrogram:
|
open("{}/source/pyrogram.tl".format(HOME), encoding="utf-8") as pyrogram:
|
||||||
schema = (auth.read() + system.read() + api.read() + pyrogram.read()).splitlines()
|
schema = (auth.read() + system.read() + api.read() + pyrogram.read()).splitlines()
|
||||||
|
|
||||||
with open("{}/template/class.txt".format(HOME), encoding="utf-8") as f:
|
with open("{}/template/mtproto.txt".format(HOME), encoding="utf-8") as f:
|
||||||
template = f.read()
|
mtproto_template = f.read()
|
||||||
|
|
||||||
|
with open("{}/template/pyrogram.txt".format(HOME), encoding="utf-8") as f:
|
||||||
|
pyrogram_template = f.read()
|
||||||
|
|
||||||
with open(NOTICE_PATH, encoding="utf-8") as f:
|
with open(NOTICE_PATH, encoding="utf-8") as f:
|
||||||
notice = []
|
notice = []
|
||||||
@ -398,8 +401,20 @@ def start():
|
|||||||
docstring_args = description + "\n\n " + docstring_args
|
docstring_args = description + "\n\n " + docstring_args
|
||||||
|
|
||||||
with open("{}/{}.py".format(path, snek(c.name)), "w", encoding="utf-8") as f:
|
with open("{}/{}.py".format(path, snek(c.name)), "w", encoding="utf-8") as f:
|
||||||
|
if c.docs:
|
||||||
f.write(
|
f.write(
|
||||||
template.format(
|
pyrogram_template.format(
|
||||||
|
notice=notice,
|
||||||
|
class_name=capit(c.name),
|
||||||
|
docstring_args=docstring_args,
|
||||||
|
object_id=c.id,
|
||||||
|
arguments=arguments,
|
||||||
|
fields=fields
|
||||||
|
)
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
f.write(
|
||||||
|
mtproto_template.format(
|
||||||
notice=notice,
|
notice=notice,
|
||||||
class_name=capit(c.name),
|
class_name=capit(c.name),
|
||||||
docstring_args=docstring_args,
|
docstring_args=docstring_args,
|
||||||
|
Loading…
Reference in New Issue
Block a user