Repository navigation
BUG: fix importing from astropy.visualization.wcsaxes.patches under Python's optimized mode - #17474
Conversation
… Python's optimized mode
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
👋 Thank you for your draft pull request! Do you know that you can use |
|
This should be an easy review. It's also the last item on #17472 so let me ping @larrybradley and @astrofrog |
|
If I remember correctly, @nstarman added this a while back, so I also requested his review. Thanks! |
|
Yeah, I aded this. Can we check that these lines are even needed with our minimum-supported matplotlib? |
|
For context: |
| Polygon.set_joinstyle.__doc__ = Polygon.set_joinstyle.__doc__.replace( | ||
| "`.JoinStyle`", "``matplotlib._enums.JoinStyle``" | ||
| ) | ||
| if sys.flags.optimize < 2: |
There was a problem hiding this comment.
What does this mean? That doc build won't be happy if sys.flags.optimize >= 2 because this patch won't be run?
There was a problem hiding this comment.
Maybe we will never build doc in that mode anyway?
There was a problem hiding this comment.
I wouldn't recommend using it to build docs since it implies dropping docstrings completely :)
pllim
left a comment
There was a problem hiding this comment.
OK LGTM then since there is no concern from Nathaniel. Thanks!
Description
ref #17472