Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove unused variables #12829

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
Nov 24, 2018
Merged

Conversation

timhoffm
Copy link
Member

PR Summary

@@ -822,7 +822,7 @@ def __setitem__(self, key, val):
"either import that binding first, or set the QT_API "
"environment variable.")
cbook.warn_deprecated(
"2.2", name=key, obj_type="rcparam", addendum=addendum)
version, name=key, obj_type="rcparam", addendum=addendum)
Copy link
Member Author

Choose a reason for hiding this comment

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

Replaced the hard-coded value.

else:
verticesA, codesA = [], []
ddxA, ddyA = 0., 0.
verticesA, codesA, ddxA, ddyA = (
Copy link
Member Author

Choose a reason for hiding this comment

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

IMHO this way it's more clear that the whole block is just a conditional assignment of the four variables.

@timhoffm timhoffm force-pushed the remove-unused-variable branch from 7832977 to fa4992b Compare November 18, 2018 12:31
@timhoffm timhoffm added this to the v3.1 milestone Nov 18, 2018
else:
verticesB, codesB = [], []
ddxB, ddyB = 0., 0.
has_end_arrow = self.endarrow and not (x2 == x3 and y2 == y3)
Copy link
Contributor

Choose a reason for hiding this comment

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

self.endarrow and (x2 != x3 or y2 != y3)
or
self.endarrow and (x2, y2) != (x3, y3)

@timhoffm timhoffm force-pushed the remove-unused-variable branch from fa4992b to 94ea287 Compare November 18, 2018 20:26
@jklymak
Copy link
Member

jklymak commented Nov 23, 2018

ping @anntzer for a re-review...

@anntzer anntzer merged commit 2e95ec4 into matplotlib:master Nov 24, 2018
@timhoffm timhoffm deleted the remove-unused-variable branch November 24, 2018 14:50
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.

3 participants