Skip to content

Fix tuple markers #16770

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 4 commits into from
Mar 16, 2020
Merged

Fix tuple markers #16770

merged 4 commits into from
Mar 16, 2020

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Mar 14, 2020

PR Summary

I was able to write a test for polygon tuple markers, but not for star or asterisk yet. The star tuple is not the same as * and asterisk, while similar to + or x, seem to have a different weight.

This broke in 3.2.0 in #14244.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • [n/a] New features are documented, with examples if plot related
  • [n/a] Documentation is sphinx and numpydoc compliant
  • [n/a] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • [n/a] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@QuLogic QuLogic added this to the v3.2.1 milestone Mar 14, 2020
@QuLogic
Copy link
Member Author

QuLogic commented Mar 14, 2020

Oh, that was supposed to be WIP because the other two tests weren't written, but oh well.

@QuLogic QuLogic added Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. status: work in progress labels Mar 14, 2020
@QuLogic
Copy link
Member Author

QuLogic commented Mar 14, 2020

Not sure what to do about star markers, so I just did a smoke test.

@tacaswell
Copy link
Member

@tacaswell
Copy link
Member

tacaswell commented Mar 15, 2020

How did you find this out of curiosity?

@QuLogic
Copy link
Member Author

QuLogic commented Mar 15, 2020

I was running flake8 without extra warnings and noticed an unused variable.

@tacaswell
Copy link
Member

Should L333 turn into an else? I think there is now a path through this for an unboundlocal error.

@QuLogic
Copy link
Member Author

QuLogic commented Mar 15, 2020

That is verified in set_marker:

elif (isinstance(marker, Sized) and len(marker) in (2, 3) and
marker[1] in (0, 1, 2)):
self._marker_function = self._set_tuple_marker

@tacaswell
Copy link
Member

fair enough, still seems like a bit of a foot-cannon to leave in the code base.

@tacaswell tacaswell merged commit aa1ed3e into matplotlib:master Mar 16, 2020
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 16, 2020
@QuLogic QuLogic deleted the fix-markers branch March 16, 2020 19:13
QuLogic added a commit that referenced this pull request Mar 17, 2020
…770-on-v3.2.x

Backport PR #16770 on branch v3.2.x (Fix tuple markers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants