refactor: changed naming convention for RawProperty to be more clear

This commit is contained in:
Darren Eberly
2020-06-01 22:08:08 -04:00
parent 3e9bf10e70
commit 80db745a6d
2 changed files with 6 additions and 6 deletions

View File

@@ -17,19 +17,19 @@ Property = Union[float, Path, str, bool, Color]
Properties = Dict[str, Property]
RawProperty = Union[float, str, bool]
RawValue = Union[float, str, bool]
class RawProperties(TypedDict):
class RawProperty(TypedDict):
"""A dictionary of raw properties."""
name: str
type: str
value: RawProperty
value: RawValue
def cast(raw_properties: List[RawProperties]) -> Properties:
""" Cast a list of `RawProperties` into `Properties`
def cast(raw_properties: List[RawProperty]) -> Properties:
""" Cast a list of `RawProperty`s into `Properties`
Args:
raw_properties: The list of `RawProperty`s to cast.

View File

@@ -183,7 +183,7 @@ class RawTiledObject(TypedDict):
visible: bool
name: str
type: str
properties: List[properties_.RawProperties]
properties: List[properties_.RawProperty]
ellipse: bool
point: bool
polygon: List[Dict[str, float]]