greatscottgadgets / luna

Amaranth HDL framework for monitoring, hacking, and developing USB devices
https://greatscottgadgets.com/cynthion/
BSD 3-Clause "New" or "Revised" License
991 stars 171 forks source link

Use Python 3.8 compatible type annotation for 'str | None' #235

Closed antoinevg closed 9 months ago

antoinevg commented 9 months ago

We've recently settled on Python 3.8 as our minimum supported Python version for releases.

Python 3.8 does not however support str | None syntax as it was only introduced in 3.10.

This PR uses typing.Optional instead.