type annotation updates
This commit is contained in:
parent
3d50ff0070
commit
9d5b1ef5e6
15 changed files with 28 additions and 28 deletions
|
|
@ -693,9 +693,9 @@ def properties_to_annotations(
|
|||
|
||||
assert proprec.values is not None
|
||||
for value in proprec.values:
|
||||
if isinstance(value, (float, int)):
|
||||
if isinstance(value, float | int):
|
||||
values.append(value)
|
||||
elif isinstance(value, (NString, AString)):
|
||||
elif isinstance(value, NString | AString):
|
||||
values.append(value.string)
|
||||
elif isinstance(value, PropStringReference):
|
||||
values.append(propstrings[value.ref].string) # dereference
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ def clean_pattern_vertices(pat: Pattern) -> Pattern:
|
|||
for shapes in pat.shapes.values():
|
||||
remove_inds = []
|
||||
for ii, shape in enumerate(shapes):
|
||||
if not isinstance(shape, (Polygon, Path)):
|
||||
if not isinstance(shape, Polygon | Path):
|
||||
continue
|
||||
try:
|
||||
shape.clean_vertices()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue