uber / h3

Hexagonal hierarchical geospatial indexing system
https://h3geo.org
Apache License 2.0
4.8k stars 457 forks source link

Missing library stubs MYPY #801

Closed Jofemago closed 9 months ago

Jofemago commented 9 months ago

In the pursuit of using typing to improve error handling in Python, I use mypy to achieve this goal. However, this library poses issues as there is a lack of 'compatibility,' so to speak, and it gives me messages like this:

image

This shouldn't block anyone since in the mypy configuration, an exception can be made using the following line ignore_missing_imports = True in the mypy.ini file.

With this, I could use the Any type for typing, which is bothersome because I would like to specify, for example, a str in the latlng_to_cell function and a tuple[float, float] in the get_center_of_hexagon function.

I would like to know if this is being worked on, will be worked on, or what opinion there is regarding adding typing to this great Python library, especially with mypy.

dfellis commented 9 months ago

I think you meant to post this in the h3-py repository. This is for the core C code.

Jofemago commented 9 months ago

@dfellis thanks done.