Deltares / xugrid

Xarray and unstructured grids
https://deltares.github.io/xugrid/
MIT License
58 stars 8 forks source link

Solve TypeError for py3.9 #183

Closed veenstrajelmer closed 8 months ago

veenstrajelmer commented 8 months ago

Commit https://github.com/Deltares/xugrid/commit/1aa1564d27528379486978f359cf2ed46d51a101 results in TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'. This only happens on python 3.9, but it is not catched by github testing since pixi uses py 3.11. The linked PR illustrates the issue but is probably not the best way to go forward.

Related: I think dask and pymetis should be added to pyproject.toml under project.optional-dependencies.all.

Huite commented 8 months ago

Should be solved by from __future__ import annotations I think.