-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Description
The codebase currently lacks type hints, which makes it harder for developers to understand function signatures, catch bugs early, and use modern IDE features effectively.
Proposed Changes
Add comprehensive type hints to all Python modules:
- Function parameters and return types
- Class attributes
- Variable annotations where beneficial
- Consider using
from typing importfor complex types (List, Dict, Optional, Union, etc.)
Affected Modules
All Python files in the skiba package would benefit from type hints:
point_extraction.pyarea_extraction.pybuffer_coordinates.pybuffer_and_sample.pygeojson_buffering.pyinteractive.pyfoliumcode.pyipyleafletcode.pycommon.py
Benefits
- Better IDE support with autocomplete and error detection
- Clearer API documentation
- Catch type-related bugs before runtime
- Improve code maintainability
- Make the codebase more professional and modern
Implementation Notes
- Should be compatible with Python 3.9+ (as per
requires-pythonin pyproject.toml) - Consider adding
mypyto development dependencies for type checking - Use modern type hint syntax where possible
Example
# Before
def buffer_coordinates(coords, radius):
...
# After
def buffer_coordinates(coords: List[Tuple[float, float]], radius: float) -> Dict[str, Any]:
...Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels