How to use the yamale.util.isstr function in yamale

To help you get started, we’ve selected a few yamale examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 23andMe / Yamale / yamale / validators / validators.py View on Github external
def _is_valid(self, value):
        return util.isstr(value)
github 23andMe / Yamale / yamale / validators / validators.py View on Github external
def __init__(self, *args, **kwargs):
        self.regex_name = kwargs.pop('name', None)

        flags = 0
        for k, v in util.get_iter(self._regex_flags):
            flags |= v if kwargs.pop(k, False) else 0

        self.regexes = [re.compile(arg, flags) for arg in args if util.isstr(arg)]
        super(Regex, self).__init__(*args, **kwargs)
github 23andMe / Yamale / yamale / validators / validators.py View on Github external
def _is_valid(self, value):
        return isinstance(value, Sequence) and not util.isstr(value)