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.
Currently, return type for
get_layer_by_name
is defined asint
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.