andreabassi78 / napari-psf-simulator

widget for PSF simulation with aberrations
BSD 3-Clause "New" or "Revised" License
26 stars 1 forks source link

running error for python<3.10 #11

Closed andreabassi78 closed 1 year ago

andreabassi78 commented 1 year ago

The current syntax used in Pyfocus required python >=3.10. See for example: https://github.com/fcaprile/PyFocus/blob/8d885383787d8225130cf05473de789fda697ca0/src/model/focus_field_calculators/base.py#L21C6-L21C67

I suggest changing the syntax back to make sure the code works for previous versions. Otherwise, we have to set some requirements for the plugin, but we might lose some users.

fcaprile commented 1 year ago

Changed type hints to be compatible with python<3.10

andreabassi78 commented 1 year ago

Hi @fcaprile, I'm afraid the notation should be changes here too. https://github.com/fcaprile/PyFocus/blob/8d885383787d8225130cf05473de789fda697ca0/src/model/focus_field_calculators/base.py#L68

Sorry, I would change it myself but I'm not familiar with this notation yet.

fcaprile commented 1 year ago

Thanks @andreabassi78, modified the typing notation there as well.