It would be nice to be able to omit the "placements" key when writing a recursive netlist by hand or generating it from another tool that is not gdsfactory. Presently, passing at least an empty dictionary required because the default pydantic Field value is None:
This pull request makes the following modification:
@validator("placements")
def validate_placement_names(cls, placements):
# NEW: check if None (no value defined, default Pydantic value), return empty dictionary
if placements is not None:
return {cls.clean_instance_string(k): v for k, v in placements.items()}
return {}
It would be nice to be able to omit the "placements" key when writing a recursive netlist by hand or generating it from another tool that is not gdsfactory. Presently, passing at least an empty dictionary required because the default pydantic Field value is None:
This pull request makes the following modification: