misc cleanup (mostly type-related)
This commit is contained in:
parent
7ad59d6b89
commit
ebfe1b559c
16 changed files with 57 additions and 21 deletions
|
|
@ -1,8 +1,12 @@
|
|||
import pytest
|
||||
from typing import cast, TYPE_CHECKING
|
||||
from ..library import Library, LazyLibrary
|
||||
from ..pattern import Pattern
|
||||
from ..error import LibraryError
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..shapes import Polygon
|
||||
|
||||
|
||||
def test_library_basic() -> None:
|
||||
lib = Library()
|
||||
|
|
@ -51,7 +55,7 @@ def test_library_flatten() -> None:
|
|||
assert not flat_parent.has_refs()
|
||||
assert len(flat_parent.shapes[(1, 0)]) == 1
|
||||
# Transformations are baked into vertices for Polygon
|
||||
assert_vertices = flat_parent.shapes[(1, 0)][0].vertices
|
||||
assert_vertices = cast("Polygon", flat_parent.shapes[(1, 0)][0]).vertices
|
||||
assert tuple(assert_vertices[0]) == (10.0, 10.0)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue