Skip to content

MNT: Set CapStyle member names automatically #22054

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
Jan 2, 2022

Conversation

StefRe
Copy link
Contributor

@StefRe StefRe commented Dec 27, 2021

PR Summary

This was certainly overlooked in #18544, otherwise it would make no sense to derive CapStyle from _AutoStringNameEnum.

PR Checklist

Tests and Styling

  • [N/A] Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [N/A] New features are documented, with examples if plot related.
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

This was certainly overlooked in matplotlib#18544, otherwise it would make
no sense to derive CapStyle from _AutoStringNameEnum.
@StefRe
Copy link
Contributor Author

StefRe commented Dec 27, 2021

Github seems to have a problem with setting up reviewdog. What should I do in such a case - just force push once more?

@dstansby dstansby added this to the v3.6.0 milestone Dec 31, 2021
@dstansby
Copy link
Member

Is this technically an API change if users are accessing and using these attributes? Can we set them to enums with their previous string values so it's less API breaking?

@StefRe
Copy link
Contributor Author

StefRe commented Dec 31, 2021

Is this technically an API change?

No, absolutely nothing changes - using xyz = auto() with the provided _AutoStringNameEnum class is just a somewhat more convoluted way of writing xyz = 'xyz' to avoid the repetition (was introduced in d2de8a2).

@timhoffm timhoffm merged commit 0c1aa86 into matplotlib:main Jan 2, 2022
@StefRe StefRe deleted the mnt/_enums branch January 2, 2022 20:58
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.

4 participants