Closed bhclowers closed 2 years ago
I think we cannot add typing hints for variables such as these lines:
I think that is supported in CPython but maybe not in CircuitPython since we don't have the typing
module.
I will test out this theory and make a PR to resolve it for this library if my hunch is correct.
Ah I was a bit mistaken. These are not "regular" variables they are arguments in a function. My understanding is that CircuitPython should be ignoring them. Not sure why it's trying to actually use Optional
but it does make sense that it would raise an exception if it is since there is no typing
module. It should still be a relatively easy fix though I think. Doing a little more troubleshooting then I'll make a PR.
Using circuitpython 7.0 (https://circuitpython.org/board/seeeduino_wio_terminal/) on the Wio Terminal, I run into an error with the adafruit_rtttl.mpy downloaded from https://circuitpython.org/libraries specific for 7.0 .
The specific error is:
Traceback (most recent call last): File "code.py", line 3, in
File "adafruit_rtttl.py", line 158, in
NameError: name 'Optional' is not defined
Any ideas on how to get things rolling?