From 80db745a6d491311f372e7ff4cefb5311436a562 Mon Sep 17 00:00:00 2001 From: Darren Eberly Date: Mon, 1 Jun 2020 22:08:08 -0400 Subject: [PATCH] refactor: changed naming convention for RawProperty to be more clear --- pytiled_parser/properties.py | 10 +++++----- pytiled_parser/tiled_object.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pytiled_parser/properties.py b/pytiled_parser/properties.py index d40938c..e0c8af0 100644 --- a/pytiled_parser/properties.py +++ b/pytiled_parser/properties.py @@ -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. diff --git a/pytiled_parser/tiled_object.py b/pytiled_parser/tiled_object.py index dac1aa8..a96141e 100644 --- a/pytiled_parser/tiled_object.py +++ b/pytiled_parser/tiled_object.py @@ -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]]