I have few modules with many fields. PyCharm has not auto completion for some fields (e. g.: PyCharm does not support typping.NamedTyple). I added a description of these fields to stub file. And it worked in PyCharm 2016. But now PyCharm has better (but is it really more correct?) support of PEP484 and it ignores fields from original modules.
Quote from PEP484: "However, as an exception to the previous bullet, all objects imported into a stub using from ... import * are considered exported. (This makes it easier to re-export all objects from a given module that may vary by Python version.)" https://www.python.org/dev/peps/pep-0484/#stub-files
I guess that means I can do so from <real module> import *
in .pyi
files. But it doesn't work in PyCharm 2017.1.
I opened the issue but they said that all was OK and it wasn't a bug.
My questions:
- Who is mistaken in understanding PEP 484?
- Which way is a true to re-export all fields from real module to stub?