File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -336,7 +336,8 @@ def start(format: bool = False):
336336 docstring = docstring ,
337337 name = type ,
338338 qualname = qualtype ,
339- types = ", " .join ([f"raw.types.{ c } " for c in constructors ])
339+ types = ", " .join ([f"raw.types.{ c } " for c in constructors ]),
340+ doc_name = snake (type ).replace ("_" , "-" )
340341 )
341342 )
342343
Original file line number Diff line number Diff line change @@ -15,3 +15,9 @@ class {name}: # type: ignore
1515 """
1616
1717 QUALNAME = "pyrogram.raw.base.{qualname}"
18+
19+ def __init__(self):
20+ raise TypeError("Base types can only be used for type checking purposes: "
21+ "you tried to use a base type instance as argument, "
22+ "but you need to instantiate one of its constructors instead. "
23+ "More info: https://docs.pyrogram.org/telegram/base/{doc_name}")
You can’t perform that action at this time.
0 commit comments