ortk95 / planetmapper

PlanetMapper: An open source Python package for visualising, navigating and mapping Solar System observations
https://planetmapper.readthedocs.io
MIT License
10 stars 1 forks source link

Type hinting: allow paths to be `pathlib.Path` instances #348

Closed ortk95 closed 4 months ago

ortk95 commented 4 months ago

We should be able to accept pathlib Path instances wherever we use str paths (e.g. the path argument of Observation). For example, this currently produces a type hinting error, when it probably shouldn't:

image

ortk95 commented 4 months ago

Probably want to use os.pathlike as the type hint, then appropriate conversions to strings internally