New submission from John Jackson: 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. ---------- components: Build messages: 294807 nosy: Paragape priority: normal severity: normal status: open title: Import type aliases from another module type: enhancement versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30518> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com