You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_config.py 514B

5 years ago
1234567891011121314151617181920212223
  1. from __future__ import absolute_import, division, print_function
  2. __all__ = ["set_run_validators", "get_run_validators"]
  3. _run_validators = True
  4. def set_run_validators(run):
  5. """
  6. Set whether or not validators are run. By default, they are run.
  7. """
  8. if not isinstance(run, bool):
  9. raise TypeError("'run' must be bool.")
  10. global _run_validators
  11. _run_validators = run
  12. def get_run_validators():
  13. """
  14. Return whether or not validators are run.
  15. """
  16. return _run_validators