MetOffice / CSET

Toolkit for evaluation and investigation of numerical models for weather and climate applications.
https://metoffice.github.io/CSET/
Apache License 2.0
8 stars 1 forks source link

Replace `Union` with `|` for type hints #607

Open jfrost-mo opened 1 month ago

jfrost-mo commented 1 month ago

What problem does your feature request solve?

The type hint Union syntax is much easier to read when done with the union operator |, and now that python 3.10 is our minimum version, we can use it.

Describe the solution you'd like

We should convert all our code to it for readability. This can be a simple search and replace.

Describe alternatives you've considered

Gradually convert whenever the code is touched, which would preserve the git blame history.