Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
merged 1 commit into from
Mar 22, 2018
Merged

More python3 cleanup #10861

merged 1 commit into from
Mar 22, 2018

Conversation

timhoffm
Copy link
Member

PR Summary

Title says it all.

@@ -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"):
Copy link
Contributor

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__()
Copy link
Contributor

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()
Copy link
Contributor

Choose a reason for hiding this comment

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

no parenthesis above

@@ -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)
Copy link
Contributor

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...

Copy link
Contributor

@dopplershift dopplershift left a 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.

@anntzer anntzer merged commit 7a3248f into matplotlib:master Mar 22, 2018
@QuLogic QuLogic added this to the v3.0 milestone Mar 23, 2018
@QuLogic QuLogic added the Py3k label Mar 23, 2018
@timhoffm timhoffm deleted the unpy2 branch March 25, 2018 11:30
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.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.