Skip to content

Set __name__ for list validators in rcsetup. #8261

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
Mar 12, 2017

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Mar 10, 2017

This avoids having many validators all named f, which makes profiling
a bit difficult (it appears that repeated validation of rcparams when
resetting the style at the beginning of each test instance contributes
quite a bit to the total test time). Instead, the list validator
based on scalar validator function validate_foo is now __name__d
validate_foolist, and the list validator based on scalar validator
class ValidateFoo is now __name__d ValidateFooList.

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Mar 10, 2017
This avoids having many validators all named `f`, which makes profiling
a bit difficult (it appears that repeated validation of rcparams when
resetting the style at the beginning of each test instance contributes
quite a bit to the total test time).  Instead, the list validator
based on scalar validator function `validate_foo` is now `__name__`d
`validate_foolist`, and the list validator based on scalar validator
class `ValidateFoo` is now `__name__`d `ValidateFooList`.
@anntzer anntzer force-pushed the name-validators-in-rcsetup branch from dee8e4f to b4ee5db Compare March 10, 2017 20:39
@NelleV NelleV changed the title Set __name__ for list validators in rcsetup. [MRG+1] Set __name__ for list validators in rcsetup. Mar 11, 2017
@NelleV NelleV merged commit 8407ffc into matplotlib:master Mar 12, 2017
@anntzer anntzer deleted the name-validators-in-rcsetup branch March 12, 2017 17:34
@QuLogic QuLogic changed the title [MRG+1] Set __name__ for list validators in rcsetup. Set __name__ for list validators in rcsetup. Apr 30, 2017
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.

3 participants