-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[examples] final pep8 fixes #3774
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
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
5cba226
fix trailing whitespace
twmr 8cae397
fix multiple whitespace issues in svg_*.py examples (E293, E291)
twmr 2f5b1e1
pep8 fix E201
twmr cc7fc7f
pep8 fix e2* in examples dir part 1/2
twmr b680680
pep8 fix e2* in examples dir part 2/2
twmr b081c92
pep8 fix E701
twmr 0130bb9
pep8 fix E502 (redundant backslash)
twmr b959c79
pep8 fix e702,e703
twmr 7122484
pep8 fix E302
twmr fa2ee50
remove blacklisted examples from coding style unittest
twmr eef2efc
ignore line to long errors for pep8 unit tests in examples/
twmr 6289558
pep8 fix E124-E129
twmr 16e1566
pep fix E401
twmr 1e822e9
fix all issues in the output of the pep8 unit test
twmr 85519f0
decrease the number of ignored pep8 error classes
twmr 111cdab
consider @weathergods suggestions
twmr 192a26c
prettify instantiation of ellipsecollection object
twmr e53ba3e
avoid triple quoted string
twmr 3bd0f57
fix mutable default arguments
twmr 2da662b
don't use implicit tuple assignment
twmr cb0467d
prettify instantiation of Linecollection obj even further
twmr 2cb5403
Revert "pep8 fix E201"
twmr a79053c
fix pep8 unit tests
twmr 9591cb8
minor cleanup in pipong example (0 + value)
twmr eab5b52
fixed extraneous whitespace
twmr 2303939
fix pep8 violations in the new boxplot examples
twmr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
consider @weathergods suggestions
- Loading branch information
commit 111cdabed4058cfdcafba156e3b51b8778c3edf6
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
colors=[colorConverter.to_rgba(i) | ||
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. Not strictly a PEP8 issue, but I think this would be nicer with the colors list comprehension assigned to a variable above, and then used by name; also, I think it could use |
||
for i in ('b', 'g', 'r', 'c', | ||
'm', 'y', 'k')], | ||
linestyle = 'solid') | ||
linestyle='solid') | ||
ax.add_collection(line_segments) | ||
ax.set_title('Line collection with masked arrays') | ||
plt.show() |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 we please explicitly use tuples here? I never liked implicit tuples on the rhs for assignments
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 would prefer to use the reshape method
x = arange(100.0).reshape((10, 10))
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.
Perhaps. I like assigning to the shape attribute because then I am not messing around with views or copies. And I even get an exception if it can not be cleanly reshaped that way. This is entirely personal preference and I can go either way.
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 didn't know that its possible to change the shape by assigning a tuple to the shape attr. You are right, this avoids messing around with views.