Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove most instances of pep8 E502 (redundant backslashes). #10196

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

Merged
merged 1 commit into from
Jan 8, 2018

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jan 8, 2018

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@QuLogic
Copy link
Member

QuLogic commented Jan 8, 2018

Seems you missed one, though.

@anntzer
Copy link
Contributor Author

anntzer commented Jan 8, 2018

Intentionally left: most surrounding lines in that specific context also have backslashes, so I felt breaking the style was not worth it (unless using parentheses for wrapping throughout).

@QuLogic
Copy link
Member

QuLogic commented Jan 8, 2018

But it's not passing now ;)

@anntzer anntzer force-pushed the redundant-backslashes branch from 3767e68 to d5fdebb Compare January 8, 2018 09:17
@anntzer
Copy link
Contributor Author

anntzer commented Jan 8, 2018

Oh, missed that, fixed. I meant that I left a "redundant" backslash (and the exclusion) in geo.py for the reasons stated above.

proj = proj3d.proj_trans_points([self._position3d, \
self._position3d + self._dir_vec], renderer.M)
proj = proj3d.proj_trans_points(
[self._position3d, self._position3d + self._dir_vec], renderer.M)
Copy link
Member

Choose a reason for hiding this comment

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

Probably should break before the second arg though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the bracketed parts doesn't fit on the same line as "proj_trans_points(" and I think we have plenty of cases where the function is on one line and all the arguments on the next line.

Copy link
Member

Choose a reason for hiding this comment

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

I mostly say to break here because the first arg is a list using commas for "other" things than separating function arguments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll follow the vote of the next reviewer.

@tacaswell tacaswell merged commit 8e8335c into matplotlib:master Jan 8, 2018
@tacaswell tacaswell added this to the v2.2 milestone Jan 8, 2018
@anntzer anntzer deleted the redundant-backslashes branch January 8, 2018 22:04
@QuLogic QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants