Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Fix ToolManager + TextBox support.#20997
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Try running e.g. examples/widgets/textbox.py together with`rcParams["toolbar"] = "toolmanager"`. Before this fix, clicking on theTextBox would result in "TypeError: push() takes 2 positional argumentsbut 3 were given".
@pytest.mark.parametrize("toolbar", ["none", "toolbar2", "toolmanager"]) | ||
def test_TextBox(toolbar): | ||
# Avoid "toolmanager is provisional" warning. | ||
dict.__setitem__(plt.rcParams, "toolbar", toolbar) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Out of interest, why this and notplt.rcParams['toolbar'] = toolbar
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
BecausercParams["toolbar"] = "toolmanager"
emits a "toolmanager is provisional API" warning. (Sure, you can play with warnings filters to suppress that, but ugh...)
…997-on-v3.5.xBackport PR#20997 on branch v3.5.x (Fix ToolManager + TextBox support.)
Fix ToolManager + TextBox support.
Try running e.g. examples/widgets/textbox.py together with
rcParams["toolbar"] = "toolmanager"
. Before this fix, clicking on theTextBox would result in "TypeError: push() takes 2 positional arguments
but 3 were given".
PR Summary
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).