diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-04-27 16:01:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-27 16:01:10 -0400 |
commit | 429c1ab9b0ee04f5a2287b8579c02907f30e795f (patch) | |
tree | b56a449fb1e79a19b67089952e815ed9b86d18a5 /cloudinit/config/schema.py | |
parent | 61a19249c2010743a467a51f8f0750712c2d92e0 (diff) | |
download | vyos-cloud-init-429c1ab9b0ee04f5a2287b8579c02907f30e795f.tar.gz vyos-cloud-init-429c1ab9b0ee04f5a2287b8579c02907f30e795f.zip |
schema: ignore spurious pylint error (#332)
The line in question is in the code path handling older versions of
jsonschema. In that context it _is_ correct, but when pylint analyses
it against the latest jsonschema it (incorrectly) detects an error.
Diffstat (limited to 'cloudinit/config/schema.py')
-rw-r--r-- | cloudinit/config/schema.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cloudinit/config/schema.py b/cloudinit/config/schema.py index 5356f492..a295d63d 100644 --- a/cloudinit/config/schema.py +++ b/cloudinit/config/schema.py @@ -103,7 +103,10 @@ def validate_cloudconfig_schema(config, schema, strict=False): cloudinitValidator = extend(Draft4Validator, type_checker=type_checker) else: # jsonschema 2.6 workaround types = Draft4Validator.DEFAULT_TYPES - types['string'] = (str, bytes) # Allow bytes as well as string + # Allow bytes as well as string (and disable a spurious + # unsupported-assignment-operation pylint warning which appears because + # this code path isn't written against the latest jsonschema). + types['string'] = (str, bytes) # pylint: disable=E1137 cloudinitValidator = create( meta_schema=Draft4Validator.META_SCHEMA, validators=Draft4Validator.VALIDATORS, |