-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
fix #5007 #5008
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
fix #5007 #5008
Conversation
@sdementen The last thing you need to do was to open the pull request. I have done this for you, but in the future see https://help.github.com/articles/creating-a-pull-request/ for how to use the gh interface to do this. |
if abs(x - lastx) < 5 or abs(y - lasty) < 5: | ||
# allows the user to "cancel" a zoom action | ||
# by zooming by less than 5 pixels | ||
if (abs(x - lastx) < 5 and self._zoom_mode!="y") \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use ()
for line continuation not \
.
You can just keep pushing commits to this branch on gh and the PR will automatically update to reflect them (the code this page is bound to is the branch name on your gh repo, not the commit currently at the tip). |
Ok, I have fixed the style issue |
# allows the user to "cancel" a zoom action | ||
# by zooming by less than 5 pixels | ||
if ((abs(x - lastx) < 5 and self._zoom_mode!="y") or | ||
(abs(y - lasty) < 5 and self._zoom_mode!="x")): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you put an extra 4 spaces on this line? This is one of those cases where I am pretty sure the pep8 guidelines are contradictory. The over-indent is less bad than aligning with the body.
I have fixed the issue and tested interactively. However, I do not know how to add a test that failed before the fix and succeed after the fix ...