Skip to content
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

minor pep8 fix on every file #2460

Merged
merged 1 commit into from Sep 26, 2013
Merged

Conversation

tacaswell
Copy link
Member

The from future ... line added in #2226 is three charachters too long according to pep8. This bulk-fixes this by breaking the import up into 4 seperate lines.

No matter what every file will need to be touched again, and 4 separate imports seemed better style to me than any other way to break it up.

sed is a handy tool.

@pelson
Copy link
Member

pelson commented Sep 25, 2013

and 4 separate imports seemed better style to me than any other way to break it up.

I don't necessarily agree. Adding parentheses is better IMHO:

from __future__ import (absolute_import, division, print_function,
                        unicode_literals)

I'd like to get some other feedback on that before you have to re-write your sed command though 😄

@mdboom
Copy link
Member

mdboom commented Sep 25, 2013

Given the restriction that __future__ come first, I had no idea it could be broken up. For consistency with other imports though, where we don't currently enforce that each "from x import y" has only one "y", I think @pelson's suggestion is preferable.

…achters

too long according to pep8.  This bulk-fixes every file in the library.
@tacaswell
Copy link
Member Author

Forcibly replaced the old commit with a new one using pelson's suggestion. Also caught a few files I missed last time.

pelson added a commit that referenced this pull request Sep 26, 2013
PEP8 fix on every file's from __future__ import
@pelson pelson merged commit 799cbe6 into matplotlib:master Sep 26, 2013
@tacaswell tacaswell deleted the fix_future_import branch September 26, 2013 14:32
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.

None yet

3 participants