-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Readable string representations for TelegramObject #3234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # telegram/_telegramobject.py # tests/test_telegramobject.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You formulated it as a question if we want to drop empty api_kwargs and if I read this correctly you just decided to go ahead with this. I like it, and the rest of the code change!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, should we include the documentation of TGObject's dunder methods? I think we should since it makes it more clear what we can do with the object as a whole.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Another part of #2698. As per #2698 (comment) doesn't add a "pprint" variant yet. IMO we can add this if we/users actually see a need for that :)
Note that once #3233 is merged, this will also include
api_kwargs
in the representation. IMO that's desirable. Once could however do a special case and exclude that if it's an empty dictionary. edit: I did thatChecklist for PRs
.. versionadded:: version
,.. versionchanged:: version
or.. deprecated:: version
to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)Added myself alphabetically toAUTHORS.rst
(optional)Added new classes & modules to the docs and all suitable__all__
s