bitcraft / pytmx

Python library to read Tiled Map Editor's TMX maps.
GNU Lesser General Public License v3.0
384 stars 81 forks source link

Wrong type hint for get_layer_by_name #174

Closed Grimmys closed 8 months ago

Grimmys commented 1 year ago

Currently, return type for get_layer_by_name is defined as int for both type hint and docstring.

But it is wrong: the method is returning a layer instead, hence something matching Union[ TiledTileLayer, TiledImageLayer, TiledGroupLayer, TiledObjectGroup ]. This should be the more appropriate type hint.