Merge branch 'rf/caster' of https://github.com/Beefy-Swain/pytiled_parser into rf/caster

This commit is contained in:
Darren Eberly
2020-05-31 01:15:57 -04:00
2 changed files with 5 additions and 3 deletions

View File

@@ -268,7 +268,9 @@ def _cast_point(raw_tiled_object: RawTiledObject) -> Point:
def _cast_tile(raw_tiled_object: RawTiledObject) -> Tile:
raise NotImplementedError
gid = raw_tiled_object["gid"]
return Tile(gid=gid, **_get_common_attributes(raw_tiled_object).__dict__)
def _cast_polygon(raw_tiled_object: RawTiledObject) -> Polygon:

View File

@@ -322,7 +322,7 @@ POINTS = [
),
]
TILE_IMAGES = [
TILES = [
(
"""
{
@@ -1053,7 +1053,7 @@ TEXTS = [
),
]
OBJECTS = ELLIPSES + RECTANGLES + POINTS + TILE_IMAGES + POLYGONS + POLYLINES + TEXTS
OBJECTS = ELLIPSES + RECTANGLES + POINTS + TILES + POLYGONS + POLYLINES + TEXTS
@pytest.mark.parametrize("raw_object_json,expected", OBJECTS)