Message294807
I have a 'base' module where I define some type aliases, such as:
from typing import List, Tuple
Block = [int, Tuple[int]]
Blocks = List[Block]
Tags = List[str]
I would like to import these aliases into other modules so that the 'base' module provides the definitive alias.
Currently, if I attempt to import the type aliases using:
from base_module import Tags, Blocks
Pycharm shows no error, but when I attempt to execute the code I get the error:
ImportError: cannot import name 'Tags'
I see that there has been some discussion related to this in 2015, but I can't find any documentation saying that something like this has been implemented. |
|
Date |
User |
Action |
Args |
2017-05-31 02:54:11 | Paragape | set | recipients:
+ Paragape |
2017-05-31 02:54:11 | Paragape | set | messageid: <1496199251.51.0.430123628937.issue30518@psf.upfronthosting.co.za> |
2017-05-31 02:54:11 | Paragape | link | issue30518 messages |
2017-05-31 02:54:11 | Paragape | create | |
|