type annotation updates

This commit is contained in:
Jan Petykiewicz 2024-07-28 19:44:04 -07:00
commit 9d5b1ef5e6
15 changed files with 28 additions and 28 deletions

View file

@ -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

View file

@ -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()