codon
codon copied to clipboard
Can't use `typing` module
I have a Python script which runs fine when using Python 3.8.5:
from typing import Tuple
def combine(a: int, b: int) -> Tuple[int, int]:
return (a, b)
print('Tuple from 1 and 2:', combine(1, 2))
When running codon run test.py (0.15.1), I get an error: test.py:1:6-12: error: no module named 'typing'.
If I remove the first line it works just fine.
Is it not possible to import and use the typing module? I want my script to be both executable by codon and Python itself.
Hi @akleemans
We'll add a mock for this module shortly. In general, all typing information is already imported within the Codon's toplevel namespace (e.g., Tuple is accessible without any imports).
@inumanag @arshajii Thank you! 🎉