Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type hints #198

Open
paulmueller opened this issue Jan 13, 2023 · 8 comments
Open

Add type hints #198

paulmueller opened this issue Jan 13, 2023 · 8 comments
Labels
good first issue Good for new contributors

Comments

@paulmueller
Copy link
Member

No description provided.

@paulmueller paulmueller added the good first issue Good for new contributors label Jan 13, 2023
@PinkShnack
Copy link
Contributor

I will add type hints to the files:

  • dclab/rtdc_dataset/feat_anc_plugin/plugin_feature.py
  • dclab/rtdc_dataset/feat_temp.py

@maxschloegel keep up with that!!

@maxschloegel
Copy link
Contributor

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

@PinkShnack
Copy link
Contributor

@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
Copy link
Member Author

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
Copy link
Contributor

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
Copy link
Member Author

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
Copy link
Contributor

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!

paulmueller added a commit that referenced this issue Jan 23, 2023
Co-authored-by: Eoghan O'Connell <eoghan.oconnell@mpl.mpg.de>
Co-authored-by: Paul Müller <paulmueller@users.noreply.github.com>
@NadiaSbaa
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for new contributors
Projects
None yet
Development

No branches or pull requests

4 participants