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

Fix marker validator with cycler (allow mix of classes) #27613

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

faisal-fawad
Copy link
Contributor

@faisal-fawad faisal-fawad commented Jan 8, 2024

PR summary

Closes #27596. Added basic support for combination of strings and integers to satisfy expected behavior.

PR checklist

Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

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

awesome, can you please add a test?

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@ksunden
Copy link
Member

ksunden commented Jan 9, 2024

Please add the following to the rcsetup.pyi file (Should be in roughly the same order as the .py file):

def validate_marker(s: Any) -> int | string: ...
def validate_markerlist(s: Any) -> list[int | string]: ...

@tacaswell tacaswell added this to the v3.9.0 milestone Jan 9, 2024
Copy link
Member

@ksunden ksunden left a comment

Choose a reason for hiding this comment

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

test failures unrelated

@story645
Copy link
Member

@faisal-fawad we typically prefer changes be squashed down to a few commits - would you have interest in squashing down to 1 commit or would you like us to do so?

lib/matplotlib/rcsetup.py Outdated Show resolved Hide resolved
lib/matplotlib/rcsetup.py Outdated Show resolved Hide resolved
lib/matplotlib/tests/test_cycles.py Outdated Show resolved Hide resolved
@faisal-fawad
Copy link
Contributor Author

@story645 If you could handle it for this PR that would be preferred.

If you don't mind me asking, how could I squash the commits myself for future PRs?

@story645
Copy link
Member

https://matplotlib.org/devdocs/devel/development_workflow.html#rewrite-commit-history

@QuLogic
Copy link
Member

QuLogic commented Jan 10, 2024

There are a few extra changes here; make sure you use a force push after rebasing.

Add test

Add stubs

Private functions & updated test

Update test

Co-authored-by: Kyle Sunden <git@ksunden.space>

Add test

Private functions & updated test
@QuLogic QuLogic merged commit c62b3c4 into matplotlib:main Jan 10, 2024
38 of 40 checks passed
@QuLogic
Copy link
Member

QuLogic commented Jan 10, 2024

Thanks @faisal-fawad! Congratulations on your first PR to Matplotlib 🎉 We hope to hear from you again.

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.

[Bug]: Markers with numeric name like CARETLEFT cannot be specified using a cycler
5 participants