Commit b48c025d by David Hotham Committed by Randy Döring

remove dead code per TODO

parent 16673925
...@@ -42,13 +42,9 @@ def validate_object(obj: dict[str, Any]) -> list[str]: ...@@ -42,13 +42,9 @@ def validate_object(obj: dict[str, Any]) -> list[str]:
Path(CORE_SCHEMA_DIR, "poetry-schema.json").read_text(encoding="utf-8") Path(CORE_SCHEMA_DIR, "poetry-schema.json").read_text(encoding="utf-8")
) )
if core_schema["additionalProperties"]:
# TODO: make this un-conditional once core update to >1.1.0b2
properties = {*schema["properties"].keys(), *core_schema["properties"].keys()} properties = {*schema["properties"].keys(), *core_schema["properties"].keys()}
additional_properties = set(obj.keys()) - properties additional_properties = set(obj.keys()) - properties
for key in additional_properties: for key in additional_properties:
errors.append( errors.append(f"Additional properties are not allowed ('{key}' was unexpected)")
f"Additional properties are not allowed ('{key}' was unexpected)"
)
return errors return errors
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment