Skip to content

Document symbols via annotation metadata, as described by PEP 727

License

Notifications You must be signed in to change notification settings

EpicWink/python-docannometa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python documentation annotation metadata

Document symbols via annotation metadata, as described by PEP 727.

This aliases the same functionality in typing_extensions if a sufficient version is installed.

Installation

pip install docannometa

Usage

from typing import Annotated

from docannometa import Doc

def repeat(
    text: Annotated[str, Doc("String to repeat")],
    n: Annotated[int, Doc("Number of times to repeat")],
) -> Annotated[str, Doc("Result string of length `n * len(text)`")]:
    """Repeat a string multiple times then concatenate."""
    return text * n

About

Document symbols via annotation metadata, as described by PEP 727

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages