DC-analysis / dclab

Python library for the post-measurement analysis of real-time deformability cytometry (RT-DC) data sets
https://dclab.readthedocs.io
Other
10 stars 12 forks source link

Add type hints #198

Open paulmueller opened 1 year ago

PinkShnack commented 1 year ago

I will add type hints to the files:

@maxschloegel keep up with that!!

maxschloegel commented 1 year ago

Yes, will do! Once my cronjob on the analysis server is running I will start taking 'the hint' :)

PinkShnack commented 1 year ago

@paulmueller dclab still have py38 as minimum, so str | pathlib.Path won't work. Are you happy with Union being used where necessary? I see you have used it qute a bit in dclab already.

paulmueller commented 1 year ago

I would rather like | and force everyone to use Python 3.10. It's just easier to read and I think we can expect it from the users.

PinkShnack commented 1 year ago

I would rather like | and force everyone to use Python 3.10. It's just easier to read and I think we can expect it from the users.

Then I guess this should be done in setup.py?

paulmueller commented 1 year ago

We actually don't have to drop support for Python<3.10. We can just do

from __future__ import annotations

in every file where we use |. This way we don't have to drop support for older Python versions...

PinkShnack commented 1 year ago

We actually don't have to drop support for Python<3.10. We can just do

from __future__ import annotations

in every file where we use |. This way we don't have to drop support for older Python versions...

You learn something new everyday!

NadiaSbaa commented 9 months ago

We have added type hints for the ICue class of dclab/rtdc_dataset/check.py: here