Small fixes around docs

This commit is contained in:
Dan 2020-08-24 15:24:06 +02:00
parent d86d8530ce
commit b057dcb39d
2 changed files with 4 additions and 4 deletions

View File

@ -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))

View File

@ -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):