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"]: properties = {*schema["properties"].keys(), *core_schema["properties"].keys()}
# TODO: make this un-conditional once core update to >1.1.0b2 additional_properties = set(obj.keys()) - properties
properties = {*schema["properties"].keys(), *core_schema["properties"].keys()} for key in additional_properties:
additional_properties = set(obj.keys()) - properties errors.append(f"Additional properties are not allowed ('{key}' was unexpected)")
for key in additional_properties:
errors.append(
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