Skip to content
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

Consolidate diff parsing logic #125

Merged
merged 14 commits into from Jun 20, 2016
Merged

Consolidate diff parsing logic #125

merged 14 commits into from Jun 20, 2016

Conversation

numberMumbler
Copy link
Contributor

Moves diff header parsing logic out of the handlers and into the APIProvider class. This allows the code to be reused, reduces the amount of code to maintain, and simplifies the handlers' logic

Fixes #47

@highfive
Copy link
Collaborator

Heads up! This PR modifies the following files:

  • @jdm: newpr.py, handlers/watchers/init.py, handlers/no_modify_css_tests/init.py, handlers/nonini_wpt_meta/init.py, handlers/unsafe/init.py, handlers/missing_test/init.py, eventhandler.py

@highfive
Copy link
Collaborator

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@numberMumbler
Copy link
Contributor Author

The "unsafe" warning seems to triggered by the changes to UnsaferHandler (related to issue #5?)

return set(f if f.startswith('/') else f[2:] for f in changed_files)
return set(f for f in map(self.normalize_file_path, changed_files) if f is not None)

def normalize_file_path(self, filepath):
Copy link
Member

Choose a reason for hiding this comment

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

Let's make this a standalone function rather than a method.

@jdm
Copy link
Member

jdm commented May 16, 2016

empty_title_element/__init__.py should be updated to use these useful methods too!

@jdm
Copy link
Member

jdm commented May 16, 2016

Thank you for doing this work, @numberMumbler! The resulting code is much nicer to reason about :)

@jdm
Copy link
Member

jdm commented May 25, 2016

Are you planning to finish this work, @numberMumbler?

@numberMumbler
Copy link
Contributor Author

yes, I should have the updates finished up this weekend

@jdm
Copy link
Member

jdm commented May 26, 2016

Great; thanks!

@bors-servo
Copy link

☔ The latest upstream changes (presumably #138) made this pull request unmergeable. Please resolve the merge conflicts.

@wafflespeanut
Copy link
Contributor

@numberMumbler Any updates on this?

@highfive
Copy link
Collaborator

highfive commented Jun 9, 2016

New code was committed to pull request.

@highfive
Copy link
Collaborator

highfive commented Jun 9, 2016

New code was committed to pull request.

@highfive
Copy link
Collaborator

New code was committed to pull request.

@numberMumbler
Copy link
Contributor Author

@wafflespeanut Should be ready to go

@wafflespeanut
Copy link
Contributor

I think there are a few commits that could be squashed, but honestly, I've never been so detailed in my commits. So, I'll leave this to @jdm :)

@numberMumbler
Copy link
Contributor Author

@wafflespeanut In these situations, is it better to just re-do the changes (in fewer commits)? I can consolidate a lot of these changes… which I'm sure would make it easier to review

@jdm
Copy link
Member

jdm commented Jun 20, 2016

I was fine with reviewing each change in isolation. This looks good to me!

@jdm jdm merged commit 6e5baa6 into servo:master Jun 20, 2016
@jdm
Copy link
Member

jdm commented Jun 20, 2016

Thanks for doing this work, @numberMumbler!

Mark-Simulacrum pushed a commit to Mark-Simulacrum/highfive that referenced this pull request Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants