diff --git a/yamllint/config.py b/yamllint/config.py index b72644c..a955d8e 100644 --- a/yamllint/config.py +++ b/yamllint/config.py @@ -157,11 +157,12 @@ def validate_rule_conf(rule, conf): raise YamlLintConfigError( 'invalid config: option "%s" of "%s" should be in %s' % (optkey, rule.ID, options[optkey])) - # Example: CONF = {option: ['flag1', 'flag2']} - # → {option: [flag1]} → {option: [flag1, flag2]} + # Example: CONF = {option: ['flag1', 'flag2', int]} + # → {option: [flag1]} → {option: [42, flag1, flag2]} elif isinstance(options[optkey], list): if (type(conf[optkey]) is not list or - any(flag not in options[optkey] + any(flag not in options[optkey] and + type(flag) not in options[optkey] for flag in conf[optkey])): raise YamlLintConfigError( ('invalid config: option "%s" of "%s" should only '