Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixed #17970 - Docstrings should not accessed with -OO #17976

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
Jul 20, 2020

Conversation

linchiwei123
Copy link
Contributor

PR Summary

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
  • 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

@jklymak
Copy link
Member

jklymak commented Jul 20, 2020

This will need comments or next code clean someone will remove it. I guess there is no way to test this.

@anntzer I think you put the original code in

@tacaswell tacaswell added this to the v3.3.1 milestone Jul 20, 2020
@tacaswell
Copy link
Member

Can we make one of our CI jobs run with -OO ?

It might be worth adding a travs job that makes sure every module (except for the GUI backends) is importable?

@anntzer
Copy link
Contributor

anntzer commented Jul 20, 2020

looks fine to me, agree that testing is necessary to avoid breakage (but doesn't have to be done as part of this pr).

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

I have a mild preference for

blah.__doc__ = foo.__doc__.format(...) if foo.__doc__ is not None else None

but not going to hold it over that.

@QuLogic
Copy link
Member

QuLogic commented Jul 20, 2020

It's already multi-line; that would make it even more multi-line.

@QuLogic QuLogic merged commit 73f8cea into matplotlib:master Jul 20, 2020
@QuLogic
Copy link
Member

QuLogic commented Jul 20, 2020

Thanks @linchiwei123!

@QuLogic
Copy link
Member

QuLogic commented Jul 20, 2020

@meeseeksdev backport to v3.3.x

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jul 20, 2020
QuLogic added a commit that referenced this pull request Jul 21, 2020
…976-on-v3.3.x

Backport PR #17976 on branch v3.3.x (Fixed #17970 - Docstrings should not accessed with -OO)
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.

5 participants