From: Rob van der Linde Date: Thu, 5 Oct 2023 01:33:32 +0000 (+1300) Subject: python: add docstrings to Validator and ValidationError X-Git-Tag: talloc-2.4.2~1139 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f93e1d17f8130180e039fcd1230737308a962ce;p=thirdparty%2Fsamba.git python: add docstrings to Validator and ValidationError Signed-off-by: Rob van der Linde Reviewed-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/getopt.py b/python/samba/getopt.py index 04cae4cce78..96fbace0d41 100644 --- a/python/samba/getopt.py +++ b/python/samba/getopt.py @@ -76,10 +76,18 @@ def check_bytes(option, opt, value): class ValidationError(Exception): + """ValidationError is the exception raised by validators. + + Should be raised from the __call__ method of the Validator subclass. + """ pass class Validator(metaclass=ABCMeta): + """Base class for Validators used by SambaOption. + + Subclass this to make custom validators and implement __call__. + """ @abstractmethod def __call__(self, field, value):