mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2025-12-26 17:02:28 +01:00
refactor: changed naming convention for RawProperty to be more clear
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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]]
|
||||
|
||||
Reference in New Issue
Block a user