GIScience / ohsome-py

Python bindings for the ohsome API
GNU General Public License v3.0
18 stars 4 forks source link

fix(BaseClient): prevent raising an error if None is passed to the log_dir #148

Closed SlowMo24 closed 8 months ago

SlowMo24 commented 8 months ago

The code is fine and fulfills the requirements of the proposed change. On the other hand, I wonder why you decided not to assert the correctness of the declared log directory by requiring it to be an optional Path instead of the optional string.

@maciej-adamiak the current approach is that we will forcefully create the path if it does not exist:

https://github.com/GIScience/ohsome-py/blob/289f4c51ad9d5249bd2488e203182fdac8e470de/ohsome/clients.py#L59-L60