You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> import typing
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'typing'
>>> import typing_test
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "typing_test.py", line 1, in <module>
ImportError: no module named 'typing'
But can be compiled as in:
Expected behaviour
Expected compilation error since the module does not exists
Observed behaviour
I expected an output error since the module typing does not exists and I discovered this only in runtime
Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree
The text was updated successfully, but these errors were encountered:
I do not consider this a bug,
Whether or not a typing module is available at runtime, does not, and should not matter to producing byte-code.
There is another issue in your example my_list: List = [] is an Annotated Assign (annassign), where the type annotation : List is ignored by the MicroPython lexer/parser , essentially downgrading it to just an Assign.
Port, board and/or hardware
ESP32
MicroPython version
MicroPython v1.23.0-preview.332.g49ce7a607.dirty on 2024-04-22; mpy-cross emitting mpy v6.3
Reproduction
This code
Fails to run, as expected
But can be compiled as in:
Expected behaviour
Expected compilation error since the module does not exists
Observed behaviour
I expected an output error since the module
typing
does not exists and I discovered this only in runtimeAdditional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree
The text was updated successfully, but these errors were encountered: