Skip to content

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