gdsfactory / kfactory

gdsfactory with a klayout backend
https://gdsfactory.github.io/kfactory/
MIT License
31 stars 11 forks source link

fix `name in cell.ports` #182

Closed gdspaul closed 11 months ago

gdspaul commented 11 months ago

Describe the bug in predicate doesn't work for KCell.ports

To Reproduce

import kfactory as kf

c = kf.KCell()
c.create_port(name="Foo", width=1, trans=kf.kdb.Trans(), layer=1)

assert "Foo" in c.ports
sebastian-goeldi commented 11 months ago

hmmm, maybe we can do this. The reason it doesn't currently work is because it is not a true dictionary. It is a list that is given the dictionary-lite treatement.