mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Small fixes around docs
This commit is contained in:
parent
d86d8530ce
commit
b057dcb39d
@ -31,7 +31,7 @@ Consider the following code:
|
||||
print(dan) # User
|
||||
|
||||
This will show a JSON representation of the object returned by :meth:`~pyrogram.Client.get_users`, which is a
|
||||
:class:`~pyrogram.User` instance, in this case. The output on your terminal will be something similar to this:
|
||||
:class:`~pyrogram.types.User` instance, in this case. The output on your terminal will be something similar to this:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
@ -116,14 +116,14 @@ error. The correct way to get the object type is by using the built-in function
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
<class 'pyrogram.UserStatus'>
|
||||
<class 'pyrogram.types.UserStatus'>
|
||||
|
||||
And to check if an object is an instance of a given class, you use the built-in function ``isinstance()``:
|
||||
|
||||
.. code-block:: python
|
||||
:name: this-py
|
||||
|
||||
from pyrogram import UserStatus
|
||||
from pyrogram.types import UserStatus
|
||||
|
||||
dan_status = dan.status
|
||||
print(isinstance(dan_status, UserStatus))
|
||||
|
@ -25,7 +25,7 @@ import pyrogram
|
||||
|
||||
class Meta(type, metaclass=type("", (type,), {"__str__": lambda _: "~hi"})):
|
||||
def __str__(self):
|
||||
return f"<class 'pyrogram.{self.__name__}'>"
|
||||
return f"<class 'pyrogram.types.{self.__name__}'>"
|
||||
|
||||
|
||||
class Object(metaclass=Meta):
|
||||
|
Loading…
Reference in New Issue
Block a user