PEtab-dev / libpetab-python

Python package for working with PEtab files
https://libpetab-python.readthedocs.io
MIT License
14 stars 6 forks source link

Typehint states it is optional, but no default value is provided. #250

Closed PaulJonasJost closed 6 months ago

PaulJonasJost commented 6 months ago

Add None as default value, due to optionality.

PaulJonasJost commented 6 months ago

Typehint states it is optional, but no default value is provided

x: Optional[pd.DataFrame] does not imply that it's an optional argument (i.e. should have a default value). It just means that None is a valid value. The naming is very unfortunate. But fine to default to None in this specific case.

True perhaps the naming is just unfortunate. Also saw no problem in None as default value. Thanks, will merge.