Message295046
> Block = [int, Tuple[int]]
> Blocks = List[Block]
These are both invalid type aliases (I have no idea why PyCharm does not flag them, you could report this at PyCharm issue tracker). I am not sure what exactly you want. If you want a list of either integers or tuples of integers, then you should write for example:
Block = Union[int, Tuple[int, ...]]
Blocks = List[Block]
Concerning import, this is definitely not a problem with aliases. What I have noticed is that you write "I have a 'base' module ..." and then "from base_module import ...", if you have a module named base.py, then you should write:
from base import Blocks, Tags
Or maybe you just have an import cycle... |
|
Date |
User |
Action |
Args |
2017-06-02 17:55:08 | levkivskyi | set | recipients:
+ levkivskyi, JelleZijlstra, Paragape |
2017-06-02 17:55:08 | levkivskyi | set | messageid: <1496426108.82.0.631953086363.issue30518@psf.upfronthosting.co.za> |
2017-06-02 17:55:08 | levkivskyi | link | issue30518 messages |
2017-06-02 17:55:08 | levkivskyi | create | |
|