Closed Conengmo closed 1 month ago
@ocefpaf would you mind taking a look at this PR at some time? No hurry. I know it's pretty big, but I don't know how to do it otherwise, it's just a lot of type hints. I'm open to suggestions! I'm asking you since you also did https://github.com/python-visualization/folium/pull/1677.
@ocefpaf would you mind taking a look at this PR at some time? No hurry. I know it's pretty big, but I don't know how to do it otherwise, it's just a lot of type hints. I'm open to suggestions! I'm asking you since you also did python-visualization/folium#1677.
Sure. I don't have a lot of experience but we can try to run mypy here to check things? I'll see what we can do. There are also some pre-commits that can help.
PS: we need to fix a conflict but I'm looking at it now.
Thanks Filipe, much appreciated! I’ll solve the merge conflict before merging. Good idea to add a precommit config as well, I’ll do that in a separate PR.
Contains some (internally) functional changes as well:
_parse_hex
to output RGBA floats directly. We only use that function inside of_parse_color
, which needs RGBA floats as output.bytes
as accepted type for color strings. That's a remnant from the Python 2 times.Do separately later:
Figure
use the same types for width and height. Also a separate PR I think. Would be easiest to have_parse_size
just return a single string._camelify
function. Is it even needed?get_templates