-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
More python3 cleanup #10861
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
More python3 cleanup #10861
Conversation
lib/matplotlib/axes/_axes.py
Outdated
@@ -5607,7 +5601,7 @@ def pcolor(self, *args, **kwargs): | ||
if 'antialiased' in kwargs: | ||
kwargs['antialiaseds'] = kwargs.pop('antialiased') | ||
if 'antialiaseds' not in kwargs and ( | ||
isinstance(ec, six.string_types) and ec.lower() == "none"): | ||
isinstance(ec, str) and ec.lower() == "none"): |
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.
cbook._str_lower_equal
__bool__ = __nonzero__ | ||
def __bool__(self): | ||
"""Return the truth value of a UnitDbl.""" | ||
return self._value.__bool__() |
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.
bool(self._value())
label = unit | ||
else: | ||
label = unit.label() | ||
label = unit if isinstance(unit, str) else unit.label() |
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.
no parenthesis above
lib/matplotlib/text.py
Outdated
@@ -63,7 +59,7 @@ def get_rotation(rotation): | ||
try: | ||
angle = float(rotation) | ||
except (ValueError, TypeError): | ||
isString = isinstance(rotation, six.string_types) | ||
isString = isinstance(rotation, str) |
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.
looks like good place to use cbook._str_equal too...
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.
Modulo @anntzer 's comments.
PR Summary
Title says it all.