summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Konstantinov <ilya.konstantinov@gmail.com>2023-03-27 21:35:03 -0400
committerIlya Konstantinov <ilya.konstantinov@gmail.com>2023-03-27 21:35:03 -0400
commit9e7e017fe98dad34daaa22ad5fd9220c69dd79b6 (patch)
treecc41d8e61b474e8becbd04a4f46f1a0a149110c2
parent1583370bc1cba5adf1da3db090f3711f2e90213c (diff)
downloadjsonschema-9e7e017fe98dad34daaa22ad5fd9220c69dd79b6.tar.gz
lint
-rw-r--r--jsonschema/_utils.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/jsonschema/_utils.py b/jsonschema/_utils.py
index 223f2df..22a0252 100644
--- a/jsonschema/_utils.py
+++ b/jsonschema/_utils.py
@@ -275,12 +275,13 @@ def find_evaluated_property_keys_by_schema(validator, instance, schema):
"properties", "additionalProperties", "unevaluatedProperties",
]:
if keyword in schema:
- if validator.is_type(schema[keyword], "boolean") and schema[keyword]:
+ schema_value = schema[keyword]
+ if validator.is_type(schema_value, "boolean") and schema_value:
for property, value in instance.items():
evaluated_keys.append(property)
- elif validator.is_type(schema[keyword], "object"):
- for property, subschema in schema[keyword].items():
+ elif validator.is_type(schema_value, "object"):
+ for property, subschema in schema_value.items():
if property in instance:
evaluated_keys.append(property)