Skip to content

Code style cleanup - #16044

Merged
anntzer merged 1 commit into
matplotlib:masterfrom
timhoffm:codestyle-cleanup
Dec 31, 2019
Merged

anntzer merged 1 commit into
matplotlib:masterfrom
timhoffm:codestyle-cleanup

Conversation

@timhoffm

Copy link
Copy Markdown
Member

PR Summary

  • Remove redundant parentheses
  • Property setters should not return anything
  • use if myvar: instead of if myvar != []:

def v_interval(self):
return self.get_view_interval()

@d_interval.setter

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This was actually a bug.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would love to have a test for this...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should actually just deprecate them, as they are just mplot3d-specific synonyms for {get,set}_{view,data}_interval...

@timhoffm timhoffm Dec 31, 2019 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Moved to a separate PR #16053.

Comment thread lib/matplotlib/dates.py Resolved
Comment thread lib/matplotlib/mathtext.py Resolved
@timhoffm timhoffm mentioned this pull request Dec 31, 2019
@timhoffm timhoffm added this to the v3.3.0 milestone Dec 31, 2019
@anntzer
anntzer merged commit cab5dcc into matplotlib:master Dec 31, 2019
@timhoffm
timhoffm deleted the codestyle-cleanup branch January 1, 2020 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants