-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[examples] pep8 fix E26* #3668
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
[examples] pep8 fix E26* #3668
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: Thomas Hisch <t.hisch@gmail.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
x = np.linspace(-4, 4, 9) | ||
x2 = x**3 | ||
y = np.linspace(-4, 4, 9) | ||
#print 'Size %d points' % (len(x) * len(y)) | ||
#print('Size %d points' % (len(x) * len(y))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are a couple of these that are missing the space after the '#' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was done on purpose. The guideline that we follow is: put a space between # and normal text but remove a space between # and code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, are the checkers clever enough to tell? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. autopep8 tries to detect if the comment contains code by checking if a call to pep8 does not distinguish between comments with code and without. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @WeatherGod's comment here #3425 (comment) is the reason why I remove spaces between # and code, even if this does not conform to pep8 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair enough. |
||
z = np.sqrt(x[np.newaxis,:]**2 + y[:,np.newaxis]**2) | ||
|
||
fig = figure() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ def doall(): | |
axis([0, 3, -len(tests), 0]) | ||
yticks(arange(len(tests)) * -1) | ||
for i, s in enumerate(tests): | ||
#print (i, s.encode("ascii", "backslashreplace")) | ||
#print(i, s.encode("ascii", "backslashreplace")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whitespace on # |
||
text(0.1, -i, s, fontsize=32) | ||
|
||
savefig('stix_fonts_example') | ||
|
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.
Yay for fixing syntax in comments!
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.
Such stuff still has to be done manually :/