Skip to content

Dandelight/ainnotate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

AInnotate

Annotate Python scripts with docstrings using AI.

Usage

TL, DR: Clone the code and see the help message.

Long version:

First, clone this code:

git clone https://github.com/Dandelight/ainnotate.git

Then, set environment variables OPENAI_API_KEY and (optionally) OPENAI_BASE_URL.

This file depends on openai and astor. You can install them with

pip install openai astor

It is recommended to install the dependencies in a virtual environment.

Finally, run

python ainnotate.py [path]

where [path] should be replaced with the path to the Python code you want to annotate.

Reminder: in the command line, if your path contains spaces, don't forget to surround it with quotation marks.

About

AI 总结 Python 函数并生成 docstring(基于 AST),避免文档代码不同步

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages