Skip to content
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

Refactor code duplication in matplotlib.markers #8340

Merged
merged 6 commits into from
Mar 30, 2017

Conversation

sindunuragarp
Copy link
Contributor

There was some code repetition in lib/matplotlib/markers.py in the functions to draw specific markers which had orientation differences such as vline and hline. Both these functions are exactly the same apart for an additional rotation in hline.

I saw that the piece of code with duplication has not been updated in a long time, so I tried to refactor it by removing code duplications. I have tried running the tests and I believe no errors occured because of this refactor.

@afvincent afvincent added this to the 2.1 (next point release) milestone Mar 26, 2017
Copy link
Contributor

@afvincent afvincent left a comment

Choose a reason for hiding this comment

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

Thanks @sindunuragarp, the refactoring looks clean to me :).

Could some core dev check that the merge-rather-than-rebase thing (IIUC the commit history) is OK?

Edit: a question with a question mark is better...

@NelleV NelleV merged commit f9e0b92 into matplotlib:master Mar 30, 2017
@tacaswell
Copy link
Member

Wait, why don't we need that svg file? I think that means a test we think is running is not...

@QuLogic
Copy link
Member

QuLogic commented Apr 2, 2017

That file should not have been added; it's created by the tests multiple times to be sure determinism works. I think it was moved to a temporary directory at some point, though, so I'm not sure how it accidentally got added.

@tacaswell
Copy link
Member

Great.

@sindunuragarp In the future please rebase rather than merging master into your feature branch.

@sindunuragarp
Copy link
Contributor Author

Sorry I'll make sure to remember that 👍

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.

5 participants