Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor handling of message vs update filters#2032

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Bibo-Joshi merged 2 commits intov13fromrefactor-update-filters
Jul 28, 2020

Conversation

Bibo-Joshi
Copy link
Member

As mentioned offline:

update_filter is a bit unsatisfactory to me. E.g. it leads to irritation with users (see#1595) and makes typing hard (see#1920)

What this PR does is:

  • MakeBaseFilter.__call__ an abstract method and implement two subclasses:MessageFilter andUpdateFilter, each of which will take care of passing the right object tofilter()
  • instead of settingupdate_filter, make the filters inherit from those.
  • Also move the abstract filter() method fromBaseFilter toMessage/UpdateFilter in order to make typing even more clear. This makes it breaking, but
    • v13 is breaking anyway
    • switching inheritance fromBaseFilter toMessageHandler is not too bad. Leavingupdate_filter = True won't even hurt …

Offline I also mentioned droppingdata_filter, but that was nonsense, as we need that for the short circuit logic of the filters

Closes#1595 and#1596

@Bibo-JoshiBibo-Joshi added the 📋 pending-reviewwork status: pending-review labelJul 27, 2020
@Bibo-JoshiBibo-Joshi added this to the13.0 milestoneJul 27, 2020
Copy link
Member

@jsmnbomjsmnbom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm very tired, but found a couple of thing that might need changes. Mostly just looks good tho!

@Bibo-JoshiBibo-Joshi requested a review fromjsmnbomJuly 27, 2020 20:48
@Bibo-JoshiBibo-Joshi removed the request for review fromPoolitzerJuly 28, 2020 06:36
@Bibo-JoshiBibo-Joshi merged commit48fca54 intov13Jul 28, 2020
@Bibo-JoshiBibo-Joshi deleted the refactor-update-filters branchJuly 28, 2020 07:10
Bibo-Joshi added a commit that referenced this pull requestAug 13, 2020
* Refactor handling of message vs update filters* address review
Bibo-Joshi added a commit that referenced this pull requestAug 16, 2020
* Refactor handling of message vs update filters* address review
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsAug 17, 2020
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@jsmnbomjsmnbomjsmnbom approved these changes

Assignees
No one assigned
Labels
📋 pending-reviewwork status: pending-review
Projects
None yet
Milestone
13.0
Development

Successfully merging this pull request may close these issues.

2 participants
@Bibo-Joshi@jsmnbom

[8]ページ先頭

©2009-2025 Movatter.jp