Skip to content

Patch for issue #6009 #6014

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 7 commits into from
Jun 6, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PEP8 compliance
Now “All right” on pep8online.com for the method format_eng in the class EngFormatter.
  • Loading branch information
afvincent committed Jun 5, 2016
commit cf201324e45fe64204a2ee561e9d6f99c9cac7cc
4 changes: 2 additions & 2 deletions lib/matplotlib/ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,11 +1112,11 @@ def format_eng(self, num):
format_str = ("%%.%if %%s" % self.places)

formatted = format_str % (mant, prefix)

formatted = formatted.strip()
if (self.unit is not "") and (prefix is self.ENG_PREFIXES[0]):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be == not is. It is just a little less brittle.

formatted = formatted + " "

return formatted


Expand Down