From 441ac2e130927cefb49e520696915e92542225a3 Mon Sep 17 00:00:00 2001 From: Benjamin Kirkbride Date: Sun, 31 May 2020 01:46:54 -0400 Subject: [PATCH] docs: docstring for _cast_tile --- pytiled_parser/tiled_object.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pytiled_parser/tiled_object.py b/pytiled_parser/tiled_object.py index d0a4517..a761489 100644 --- a/pytiled_parser/tiled_object.py +++ b/pytiled_parser/tiled_object.py @@ -270,6 +270,14 @@ def _cast_point(raw_tiled_object: RawTiledObject) -> Point: def _cast_tile(raw_tiled_object: RawTiledObject) -> Tile: + """ Cast the raw_tiled_object to a Tile object. + + Args: + raw_tiled_object: Raw Tiled object to be casted to a Tile + + Returns: + Tile: The Tile object created from the raw_tiled_object + """ gid = raw_tiled_object["gid"] return Tile(gid=gid, **_get_common_attributes(raw_tiled_object).__dict__)