Skip to main content

API doc generator for NoneBot.

Reason this release was yanked:

export pre-release

Project description

nb-autodoc

Python Version

������

��������� NoneBot ��� API ���������������������������������������������������������������

��������������������������������������������������������������������������������������� Google Style Docstring ��� Docstring ������������������������������������������������������

������������������ nb-autodoc ��������� ast ������������������ stub file ������������������������������������

Cheat Sheet

������������

Module

"""
description.

FrontMatter:
    sidebar: auto
    option:
        (anything nested)
"""

������: FrontMatter ������������ description ���������

Class

"""
������:
    name: desc
    kwargs: other desc

������:
    attr1: desc
"""

__init__ ������������������������������������������������ docstring ������������������

������������������������������������������������

Function

"""
������:
    name: desc, case in ['case1', 'case2']
        - `case1`: desc
        - `case2`: desc
    name2 (Union[pkg.foo.Foo, str]): desc

������:
    Optional[pkg.foo.Foo]: ������

������:
    ```python
    print('hello world!')
    ```
    ������������
"""

������������������������������������������������������������������������������������������������������������ url link���

���������������������������������������������������������������������������������

������������������������������������������������������������ ^(?! )([\w\.\[\], ]+)(?: *\(([\w\.\[\], ]+)\))?(.*?): ������������������������������������������������������������ annotation ������ url link ������������������������������������

Variable

������������������������

������������

������: 1.1.0+

������ (1.1.0+):
    name (annotation) {version}`1.1.0+`: desc

������������Variable ������������������������������������

������������: 1.1.0+

���������������������

  • version

    {version}`1.1.0+`
    
  • ref

    {ref}`pkg.foo.Foo`
    

������������������

��������������� __autodoc__ ������������������������������������������������������������������������������������ True ������ False���

���:

__autodoc__ = {
    "MyClass": True,
    "MyClass.attr": False
}

������������������������������������������������ docstring���������������������������������������������������

������: ��������������������������������������������� True ��������������������������������������� stub file ���������������

Schedule

  1. reduce code redundancy

  2. ���������������������������������������������������������������������������������������������������������������

  3. ������������������

  4. ������������������

Development Roadmap

  • 1.0

    • ������ AST ��������������������������������������������������������� import_module ��������������������������������������������������������������������������������������������� docstring ���������������������������������������������������������������������������������

    • ������ AST ������ if TYPE_CHECKING ��������� import ��� importfrom (performance relative import) ��������������������������� attributes dict��������������� get_type_hints������������������������������������ callable ���������

    • ��������� pyi ������������������������ overload ���������������

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nb-autodoc-0.1.0.tar.gz (30.3 kB view hashes)

Uploaded Source

Built Distribution

nb_autodoc-0.1.0-py3-none-any.whl (33.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page