Conversation
Eldinnie
requested changes
Aug 1, 2017
Member
Eldinnie
left a comment
There was a problem hiding this comment.
2 small docstring things, looks good.
telegram/message.py
Outdated
| def effective_attachment(self): | ||
| """ | ||
| Optional[Union[:class:`telegram.Audio`, :class:`telegram.Game`, :class:`telegram.Document`, | ||
| :class:`telegram.Photo`, :class:`telegram.Sticker`, :class:`telegram.Video`, |
Member
There was a problem hiding this comment.
telegram.Photo does not exists. Should be List[:class:`telegram.PhotoSize`]
telegram/message.py
Outdated
| :class:`telegram.Voice`, :class:`telegram.VideoNote`, :class:`telegram.Contact`, | ||
| :class:`telegram.Location`, :class:`telegram.Venue`, :class:`telegram.Invoice`, | ||
| :class:`telegram.SuccessfulPayment`]]: The attachment that this message was sent with. May | ||
| be ``None`` if no attachment was sent. |
Member
There was a problem hiding this comment.
space too much at start of line, makes weird docs.
jsmnbom
reviewed
Aug 1, 2017
telegram/message.py
Outdated
| @property | ||
| def effective_attachment(self): | ||
| """ | ||
| Optional[Union[:class:`telegram.Audio`, :class:`telegram.Game`, :class:`telegram.Document`, |
Member
There was a problem hiding this comment.
Shouldn't it be:
:class:`telegram.Audio` | :class:`telegram.Game` | :class:`telegram.Document` [...]
I'm not sure our sphinx parser understands the optional and union very well
Edit:
After testing it, it understands neither, so something like below might be clearest actually:
:class:`telegram.Audio` or :class:`telegram.Game` or :class:`telegram.Document` or
:class:`telegram.Photo` or :class:`telegram.Sticker` or :class:`telegram.Video` or
:class:`telegram.Voice` or :class:`telegram.VideoNote` or :class:`telegram.Contact` or
:class:`telegram.Location` or :class:`telegram.Venue` or :class:`telegram.Invoice` or
:class:`telegram.SuccessfulPayment`: The attachment that this message was
sent with. May be ``None`` if no attachment was sent.
Member
|
I thought I had put this here, but apparently I only mentioned it in chat. photo is of type List[:class:'telegram.PhotoSize'] and I would like it visually better if the possible attachments would be listed in alphabetical order. |
[ci skip]
This was referenced Mar 2, 2018
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.
No description provided.