This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author levkivskyi
Recipients JelleZijlstra, Paragape, levkivskyi
Date 2017-06-02.17:55:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496426108.82.0.631953086363.issue30518@psf.upfronthosting.co.za>
In-reply-to
Content
>     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...
History
Date User Action Args
2017-06-02 17:55:08levkivskyisetrecipients: + levkivskyi, JelleZijlstra, Paragape
2017-06-02 17:55:08levkivskyisetmessageid: <1496426108.82.0.631953086363.issue30518@psf.upfronthosting.co.za>
2017-06-02 17:55:08levkivskyilinkissue30518 messages
2017-06-02 17:55:08levkivskyicreate