mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-31 22:35:36 +00:00
Warn users in case they try to use base types as arguments
This commit is contained in:
@@ -15,3 +15,9 @@ class {name}: # type: ignore
|
||||
"""
|
||||
|
||||
QUALNAME = "pyrogram.raw.base.{qualname}"
|
||||
|
||||
def __init__(self):
|
||||
raise TypeError("Base types can only be used for type checking purposes: "
|
||||
"you tried to use a base type instance as argument, "
|
||||
"but you need to instantiate one of its constructors instead. "
|
||||
"More info: https://docs.pyrogram.org/telegram/base/{doc_name}")
|
||||
|
Reference in New Issue
Block a user