refactor: Removed templates as an attribute of TiledObjects

This commit is contained in:
Darren Eberly
2020-06-01 21:38:08 -04:00
parent 79f36a8f25
commit b7c4b3ba76

View File

@@ -7,7 +7,6 @@ from typing_extensions import TypedDict
from . import properties as properties_
from .common_types import Color, OrderedPair, Size
from .template import Template
@attr.s(auto_attribs=True, kw_only=True)
@@ -29,7 +28,6 @@ class TiledObject:
name: The name of the tiled object.
type: The type of the tiled object.
properties: The properties of the TiledObject.
template: A reference to a Template tiled object FIXME
"""
id: int
@@ -44,7 +42,6 @@ class TiledObject:
type: Optional[str] = None
properties: properties_.Properties = {}
template: Optional[Template] = None
@attr.s()
@@ -167,7 +164,6 @@ class RawTiledObject(TypedDict):
name: str
type: str
properties: List[properties_.RawProperties]
template: Template
ellipse: bool
point: bool
polygon: List[Dict[str, float]]
@@ -229,9 +225,6 @@ def _get_common_attributes(raw_tiled_object: RawTiledObject) -> TiledObject:
if raw_tiled_object.get("properties"):
common_attributes.properties = properties_.cast(raw_tiled_object["properties"])
if raw_tiled_object.get("template"):
raise NotImplementedError
return common_attributes