PEP 484 vs PyCharm 2017.1

I have few modules with many fields. PyCharm does not auto-complete for some fields (for example, PyCharm does not support typping.NamedTyple). I've added a description of these fields for the stub. And this worked in PyCharm 2016. But now PyCharm is better (but is it more correct?) Supports PEP484 and ignores fields from original modules.

Quoting from PEP484: "However, as an exception to the previous bullet, all objects imported into a stub using ... import * are considered exported (this makes it easier to re-export all objects from a given module , which may vary depending on the Python version.)" https://www.python.org/dev/peps/pep-0484/#stub-files

I guess this means that I can do it from <real module> import *

in .pyi

files. But that doesn't work in PyCharm 2017.1.

Example: enter image description here

I opened an issue , but they said everything was fine and it was not a bug.

My questions:

  • Who is wrong about PEP 484?
  • How can I re-export all fields from the real module to a stub?
+3


source to share





All Articles