Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix two undefined names#10938

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 2 commits intomatplotlib:masterfromcclauss:fix-undefined-names
Apr 2, 2018

Conversation

cclauss
Copy link

PR Summary

Fix two undefined names:

  • import inspect indecorators.py
  • Changeret -->__ret inpyplot.py

Thepyplot.py change is probably not useful as this is generated code but it does highlight a bug in the code generator.

Fixes:

$ python3 -m flake8 . --count --select=E9,F821,F822,F823 --show-source --statistics./lib/matplotlib/pyplot.py:2837:19: F821 undefined name 'ret'    if isinstance(ret, cm.ScalarMappable): sci(__ret)                  ^./lib/matplotlib/testing/decorators.py:88:12: F821 undefined name 'inspect'        if inspect.isgeneratorfunction(func):           ^2     F821 undefined name 'ret'

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 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/api_changes.rst if API changed in a backward-incompatible way

@anntzer
Copy link
Contributor

The bug is in tools/boilerplate.py (in the cmappable dict); do you mind editing it there as well? Thanks!

A more permanent fix to the undefined name issue.
@timhoffmtimhoffm merged commitcc44f57 intomatplotlib:masterApr 2, 2018
@QuLogicQuLogic added this to thev3.0 milestoneApr 2, 2018
@cclausscclauss deleted the fix-undefined-names branchApril 2, 2018 04:58
@cclauss
Copy link
Author

Thanks for this. I would like to addpython3 -m flake8 . --count --select=E9,F821,F822,F823 --show-source --statistics to the matplotlib testing so that we do not have any backsliding onundefined names (F821 and F822) that other linters do not seem to cover. In which file would you advise that I try adding that test?

cclauss pushed a commit to cclauss/matplotlib that referenced this pull requestApr 2, 2018
As discussed atmatplotlib#10938 (comment) _undefined names_ have [occurred often in the past](https://github.com/matplotlib/matplotlib/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed) and this change would help to avoid recurrence in the future.
cclauss pushed a commit to cclauss/matplotlib that referenced this pull requestApr 2, 2018
As discussed atmatplotlib#10938 (comment) _undefined names_ have [occurred often in the past](https://github.com/matplotlib/matplotlib/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed) and this change would help to avoid recurrence in the future.
cclauss pushed a commit to cclauss/matplotlib that referenced this pull requestApr 2, 2018
As discussed atmatplotlib#10938 (comment) _undefined names_ have [occurred often in the past](https://github.com/matplotlib/matplotlib/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed) and this change would help to avoid recurrence in the future.
cclauss pushed a commit to cclauss/matplotlib that referenced this pull requestApr 3, 2018
As discussed atmatplotlib#10938 (comment) _undefined names_ have [occurred often in the past](https://github.com/matplotlib/matplotlib/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed) and this change would help to avoid recurrence in the future.
cclauss pushed a commit to cclauss/matplotlib that referenced this pull requestApr 3, 2018
As discussed atmatplotlib#10938 (comment) _undefined names_ have [occurred often in the past](https://github.com/matplotlib/matplotlib/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed) and this change would help to avoid recurrence in the future.
cclauss pushed a commit to cclauss/matplotlib that referenced this pull requestApr 5, 2018
As discussed atmatplotlib#10938 (comment) _undefined names_ have [occurred often in the past](https://github.com/matplotlib/matplotlib/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed) and this change would help to avoid recurrence in the future.
cclauss pushed a commit to cclauss/matplotlib that referenced this pull requestMay 8, 2018
As discussed atmatplotlib#10938 (comment) _undefined names_ have [occurred often in the past](https://github.com/matplotlib/matplotlib/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed) and this change would help to avoid recurrence in the future.
QuLogic pushed a commit to QuLogic/matplotlib that referenced this pull requestJun 22, 2018
As discussed atmatplotlib#10938 (comment)_undefined names_ have [occurred often in thepast](https://github.com/matplotlib/matplotlib/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed)and this change would help to avoid recurrence in the future.
QuLogic pushed a commit to QuLogic/matplotlib that referenced this pull requestJun 22, 2018
As discussed atmatplotlib#10938 (comment)_undefined names_ have [occurred often in thepast](https://github.com/matplotlib/matplotlib/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed)and this change would help to avoid recurrence in the future.
QuLogic pushed a commit to QuLogic/matplotlib that referenced this pull requestJun 23, 2018
As discussed atmatplotlib#10938 (comment)_undefined names_ have [occurred often in thepast](https://github.com/matplotlib/matplotlib/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed)and this change would help to avoid recurrence in the future.
QuLogic pushed a commit to QuLogic/matplotlib that referenced this pull requestJun 29, 2018
As discussed atmatplotlib#10938 (comment)_undefined names_ have [occurred often in thepast](https://github.com/matplotlib/matplotlib/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed)and this change would help to avoid recurrence in the future.
QuLogic pushed a commit to QuLogic/matplotlib that referenced this pull requestJul 7, 2018
As discussed atmatplotlib#10938 (comment)_undefined names_ have [occurred often in thepast](https://github.com/matplotlib/matplotlib/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed)and this change would help to avoid recurrence in the future.
QuLogic pushed a commit to QuLogic/matplotlib that referenced this pull requestJul 7, 2018
As discussed atmatplotlib#10938 (comment)_undefined names_ have [occurred often in thepast](https://github.com/matplotlib/matplotlib/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed)and this change would help to avoid recurrence in the future.
QuLogic pushed a commit to QuLogic/matplotlib that referenced this pull requestJul 7, 2018
As discussed atmatplotlib#10938 (comment)_undefined names_ have [occurred often in thepast](https://github.com/matplotlib/matplotlib/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed)and this change would help to avoid recurrence in the future.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@anntzeranntzeranntzer approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.0.0
Development

Successfully merging this pull request may close these issues.

4 participants
@cclauss@anntzer@timhoffm@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp