enable passing in str where an AString or NString is needed.

This commit is contained in:
Jan Petykiewicz 2020-05-19 00:47:17 -07:00
commit 99283aaaf0
2 changed files with 18 additions and 18 deletions

View file

@ -386,12 +386,12 @@ class Cell:
placements: List[records.Placement]
geometry: List[records.geometry_t]
def __init__(self, name: Union[NString, int]):
def __init__(self, name: Union[NString, str, int]):
"""
Args:
name: `NString` or "CellName reference" number
"""
self.name = name
self.name = name if isinstance(name, (NString, int)) else NString(name)
self.properties = []
self.placements = []
self.geometry = []