-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
STY Ensures that "flake8 ." works #20298
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
Conversation
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.
Yes, I agree. Thanks!
ax1 = plt.subplot2grid((3, 1), (0, 0), rowspan=2) | ||
ax2 = plt.subplot2grid((3, 1), (2, 0)) |
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.
Hmm, so we can't do fig.subplot2grid
?
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.
what's wrong with the current code? If fig
was not used, there is no point assigning this variable.
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.
I do not think fig.subplot2grid
exists. I added plt.subplot2grid(..., fig=fig)
to be more OO.
.3 * np.random.normal(size=2), | ||
mode='constant', | ||
).ravel() | ||
def shift(x): return ndimage.shift(x.reshape((8, 8)), |
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.
Maybe add a line break
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.
I thought we told flake8 to ignore that kind of thing?
in setup.cfg we ignore:
E731, # do not assign a lambda expression, use a def
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.
Autopep8 did its magic here. I reverted the change and just fixed this part manually
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.
Just questions from me but LGTM anyway, thanks Thomas
.3 * np.random.normal(size=2), | ||
mode='constant', | ||
).ravel() | ||
def shift(x): return ndimage.shift(x.reshape((8, 8)), |
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.
I thought we told flake8 to ignore that kind of thing?
in setup.cfg we ignore:
E731, # do not assign a lambda expression, use a def
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.
LGTM!
Merged! |
Circle CI was still running but the lint step was already green. |
Reference Issues/PRs
Closes #20296
What does this implement/fix? Explain your changes.
I ran:
And did a few manual adjustments. I do not think there are many recent PRs that touch these lines, so I think it is okay to fix these for flake8.
CC @rth