0

My problem is that I have a python module that is loaded using a C ++ library. In the end, I get the module, but the auto-completion does not work. I would like to write ... maybe a plugin, maybe the class is a stub, where all the comments I need are present, which will provide support for autocompletion. A more acceptable option for me would be to write a stub class. But I do not know how to start, tell me where to dig into the solution of this problem?

The library uses the creation of methods on the fly, pycharm can not in any way statically index it. I need the option with the placeholder file, where I would get to describe the required structure.

  • PyCharm automatically creates stubs for extension libraries, but if it doesn't for yours, you may need to re-add the environment. See the duplicate. – Martijn Pieters Mar 20 '18 at 08:42
  • The library uses the creation of methods on the fly, pycharm can not in any way statically index it. I need the option with the placeholder file, where I would get to describe the required structure. – Дмитрий Дубина Mar 20 '18 at 09:20
  • You can’t statically analyse an extension library, PyCharm has to do it dynamically. Have you tried it yet? Next, I’d look into `.pyi` stub files (https://www.jetbrains.com/help/pycharm/type-hinting-in-pycharm.html), but if you are generating your methods dynamically, won’t a static stub file fall short? – Martijn Pieters Mar 20 '18 at 14:18
  • Thanks, stub file solve my problem – Дмитрий Дубина Mar 20 '18 at 17:17

0 Answers0