Skip to content

How to implement custom completion items through pyi scripts? #967

@jiajiawei

Description

@jiajiawei

I feel very much that your project is exactly what I need Then I have another function that I don't know how to implement Would you please take a look at it when you are free

I want to implement some built-in class, function, and variable into the editor, which need to be dynamically injected and may change frequently And there is no implementation, only a declaration

What I can think of is using .pyi files to do this But I don't know how to inject my customized file into pyls / jedi

ex: ide.pyi

class Person:
    def study(self) -> None: ...
    def play(self) -> None: ...

When I write the following code, both the Person on the first line and the Study on the second line can be automatically prompted

from ide import *            # It would be even better if we didn't add this line
p = Person()
p.study()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions