From b057dcb39db63b7fce8683aa8705dfcca02f16a9 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Mon, 24 Aug 2020 15:24:06 +0200 Subject: [PATCH] Small fixes around docs --- docs/source/topics/debugging.rst | 6 +++--- pyrogram/types/object.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/topics/debugging.rst b/docs/source/topics/debugging.rst index 995ce9e5..ac0b396f 100644 --- a/docs/source/topics/debugging.rst +++ b/docs/source/topics/debugging.rst @@ -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 - + 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)) diff --git a/pyrogram/types/object.py b/pyrogram/types/object.py index 887b8e08..a447a0ed 100644 --- a/pyrogram/types/object.py +++ b/pyrogram/types/object.py @@ -25,7 +25,7 @@ import pyrogram class Meta(type, metaclass=type("", (type,), {"__str__": lambda _: "~hi"})): def __str__(self): - return f"" + return f"" class Object(metaclass=Meta):