##// END OF EJS Templates
localrepo: subclass the new `repository.ipeercommandexecutor` Protocol class...
localrepo: subclass the new `repository.ipeercommandexecutor` Protocol class This is the same transformation as 3a90a6fd710d did for dirstate, but the CamelCase naming was already cleaned up here. See 4ef6dbc27a99 for the benefits of explicit subclassing. Since we're direct subclassing here and there are only a few methods on this interface, also make them abstract like was done in ef119f914fc1.

File last commit:

r50538:e1c586b9 default
r53393:e123c8a2 default
Show More
_config.py
31 lines | 826 B | text/x-python | PythonLexer
Matt Harbison
attr: vendor 22.1.0...
r50538 # SPDX-License-Identifier: MIT
Siddharth Agarwal
thirdparty: vendor attrs...
r34398
__all__ = ["set_run_validators", "get_run_validators"]
_run_validators = True
def set_run_validators(run):
"""
Set whether or not validators are run. By default, they are run.
Matt Harbison
attr: vendor 22.1.0...
r50538
.. deprecated:: 21.3.0 It will not be removed, but it also will not be
moved to new ``attrs`` namespace. Use `attrs.validators.set_disabled()`
instead.
Siddharth Agarwal
thirdparty: vendor attrs...
r34398 """
if not isinstance(run, bool):
raise TypeError("'run' must be bool.")
global _run_validators
_run_validators = run
def get_run_validators():
"""
Return whether or not validators are run.
Matt Harbison
attr: vendor 22.1.0...
r50538
.. deprecated:: 21.3.0 It will not be removed, but it also will not be
moved to new ``attrs`` namespace. Use `attrs.validators.get_disabled()`
instead.
Siddharth Agarwal
thirdparty: vendor attrs...
r34398 """
return _run_validators