X Tutup
Skip to content

Refactor code duplication in matplotlib.markers#8340

Merged
NelleV merged 6 commits intomatplotlib:masterfrom
delftswa2017:refactor_markers
Mar 30, 2017
Merged

Refactor code duplication in matplotlib.markers#8340
NelleV merged 6 commits intomatplotlib:masterfrom
delftswa2017:refactor_markers

Conversation

@sindunuragarp
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Great.

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

@sindunuragarp
Copy link
Copy Markdown
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

X Tutup