Merged
Conversation
Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com>
Signed-off-by: starry69 <starry369126@outlook.com> Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com> Co-authored-by: poolitzer <25934244+Poolitzer@users.noreply.github.com>
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
Bibo-Joshi
requested changes
Nov 6, 2021
Member
Bibo-Joshi
left a comment
There was a problem hiding this comment.
nice updates! I left a number of more comments though I'd classify most of them as nitpicking by now 😃
Bibo-Joshi
requested changes
Nov 13, 2021
Bibo-Joshi
reviewed
Nov 19, 2021
Member
Bibo-Joshi
left a comment
There was a problem hiding this comment.
One detail, otherwise I'm happy :)
IIRC you'll sort the contents of filters.py now, right?
I'll force-push v14 to include the master changes later tonight.
If you want to, this could be a good chance to get to know rebasing :D basically, you (pull v14 and) run git rebase v14 and follow the comments in the command line. I guess there should be few to none merge conflicts :)
Alternatively, just merging v14 into this branch is fine as well ofc :)
PS: this article helped me quite well when working with rebase the first time
harshil21
added a commit
that referenced
this pull request
Nov 20, 2021
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.
Breaking changes:
Also fixes #2281 (the problem was that we had duplicate docs in filters.)
Checklist for PRs
AddedHow do we want to document this breaking change? Just a.. versionadded:: version,.. versionchanged:: versionor.. deprecated:: versionto the docstrings for user facing changes (for methods/class descriptions, arguments and attributes).. versionchanged::on top of the filters module?Notable changes:
Converted
__new__inBaseFilterto__init__see: Overhaul of Filters #2759 (comment)Made
_UpdateTypepublic, so users can now do:filters.UpdateType.MESSAGES.deleted
ChatType'sfilter()as discussed offline (reasoning was thatFilters.chat_typewas alwaysTrue) .All
_ChatUserBaseFiltersubclasses have a CAPS shortcut withallow_empty=True, we can discuss to remove this / keep it default (False). This allows a user to do something likefilters.SENDER_CHATwork for both Channels and Supergroups.Edit: It was decided that those shortcuts won't inherit from
_CUBFand instead be their own, seehttps://t.me/pythontelegrambotdev/261 for discussion.
Use a.functools.partial()inDICEfilter to simplify it for the user. See the examples section in Dice docsReverted. See: Overhaul of Filters #2759 (comment)
Minor changes:
_Dice(to reduce repetition, it is now built from the emoji itself)User,ChatinfilterstoTG{User, Chat}to avoid namespace conflicts.Optional[str]->strinMimeTypeandCategory(it was just plain wrong).