Skip to content

eallender/zed-python-autodoc

Repository files navigation

Python Autodoc for Zed


Generates PEP 257 docstrings for Python functions and classes. Type """ on the line after a definition to trigger completion.

Handles typed parameters, return types, exceptions, dataclasses, async functions, *args/**kwargs, and nested functions.

Examples

  1. Function with typed parameters

Basic Example

  1. Function with exceptions

Exception Example

  1. Dataclasses

Basic Example

  1. Complex signatures

Complex Example

More examples can be found in examples/.

PEP 257 notes:

  • Class docstrings get a summary only; __init__ parameters are documented in __init__
  • None return types are omitted
  • Raises: is only generated when the function body contains raise statements

License

MIT — see LICENSE.

Packages

 
 
 

Contributors

Languages