Readable string representations for TelegramObject#3234
Merged
Bibo-Joshi merged 8 commits intomasterfrom Oct 30, 2022
Merged
Conversation
# Conflicts: # telegram/_telegramobject.py # tests/test_telegramobject.py
Poolitzer
approved these changes
Oct 24, 2022
Member
Poolitzer
left a comment
There was a problem hiding this comment.
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!
harshil21
requested changes
Oct 26, 2022
Member
harshil21
left a comment
There was a problem hiding this comment.
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.
This was referenced Oct 30, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_kwargsin 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:: versionor.. deprecated:: versionto 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