FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Deprecate hatch patterns with invalid values by QuLogic · Pull Request #17926 · matplotlib/matplotlib · GitHub

Repository navigation

Deprecate hatch patterns with invalid values - #17926

Merged
dstansby merged 2 commits into
matplotlib:masterfrom
QuLogic:warn-hatch
Jul 17, 2020
Merged

dstansby merged 2 commits into
matplotlib:masterfrom
QuLogic:warn-hatch

Conversation

QuLogic commented Jul 15, 2020

Copy link
Copy Markdown
Member

PR Summary

I noticed while going over the hatch doc PRs that we don't really validate this. This magically works because we just check for the count of the various hatch characters. Since it used to 'work', this adds a deprecation period over which people can fix their calls.

Also, use the new hatch style reference in the Collection docstring since that's more in line with what the docstring is asking for.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • 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)
  • Documented in doc/api/next_api_changes/* if API changed in a backward-incompatible way

QuLogic added this to the v3.4.0 milestone Jul 15, 2020
QuLogic added the API: argument checking Validation of acceptable argument values label Jul 15, 2020
Comment thread lib/matplotlib/hatch.py Outdated
Comment thread lib/matplotlib/hatch.py Outdated
QuLogic force-pushed the warn-hatch branch 2 times, most recently from 9e10c6e to 9bbc045 Compare July 15, 2020 05:49

dstansby left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks 👍 overall. backend_bases.GraphicsContextBase also has a set_hatch, does the same validation need applying there?

Comment thread lib/matplotlib/hatch.py
Comment thread lib/matplotlib/hatch.py Outdated
QuLogic added 2 commits July 16, 2020 19:39
Instead of the hatch demo, which doesn't do what the docstring says it
does.

QuLogic commented Jul 16, 2020

Copy link
Copy Markdown
Member Author

I didn't expect a user to be calling backend_bases.GraphicsContextBase.set_hatch directly, so that's why I didn't add anything to it.

dstansby merged commit e5454a3 into matplotlib:master Jul 17, 2020
QuLogic deleted the warn-hatch branch July 17, 2020 09:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API: argument checking Validation of acceptable argument values

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL