Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for .pyi files #316

Open
jackswiney opened this issue Feb 20, 2024 · 1 comment
Open

Add Support for .pyi files #316

jackswiney opened this issue Feb 20, 2024 · 1 comment
Assignees

Comments

@jackswiney
Copy link

Is your feature request related to a problem? Please describe.

I have a PyBind11 package that essentially includes *.so c++ source, and *.pyi files for intellisense. It looks like the *.py file extension is hard-coded between this and docspec-python, so the only way to get around this was to change the source to look for the *.pyi extension, or to manually rename my *.pyi files with the *.py extension.

Describe the solution you'd like

I'd prefer a CLI flag to change the file extension, or accept multiple file extensions.

Describe alternatives you've considered

  1. Temporarily change the files to the *.py extension, running this tool, then reverting the extensions to *.pyi.
  2. Updating the source directly to look for *.pyi OR *.py.
  3. Inheriting from the classes in this API and the docspec-python API, then writing custom functions to handle *.pyi.
@PJ-Schulz
Copy link

Hello,
I have a use case where I have a large file in my library and adding the docstings to it will increase it more which causes to scroll a lot. Therfore I thought to export the docstrings to .pyi files.
So I have a file called client.py and client.pyi. Maybe on this case the .pyi file should be prefered before the .py file to search for docstings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants