docstring-generator-0.2.2
توضیحات
Auto generate docstring from type-hints.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | docstring-generator-0.2.2 |
| نام | docstring-generator |
| نسخه کتابخانه | 0.2.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | FelixTheC |
| ایمیل نویسنده | felixeisenmenger@gmx.net |
| آدرس صفحه اصلی | https://github.com/FelixTheC/docstring_generator |
| آدرس اینترنتی | https://pypi.org/project/docstring-generator/ |
| مجوز | MIT |
# docstring_generator
Auto generate docstring from type-hints
## How to use it
```shell
gendocs file.py
```
```shell
gendocs mydir/
```
## Options
### style
- `--style`
- Docstring style [numpy, rest]. [default: numpy]
### ignore-classes
- `--ignore-classes`
- when used then no class will be modified
### ignore-functions
- `--ignore-functions`
- when used then no function will be modified this
- __!important__ class methods are no functions in this context
### Add additional information before running `gendocs`
- when adding `$<num>` into your docstring these will then be replaced with parameter at this index
- Example:
```python
from typing import List
def foo(val_a: int, val_b: List[int]):
"""
Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
$1 Lorem ipsum dolor sit amet
$2 nonumy eirmod tempor invidun
"""
```
will become (here with numpy style)
```python
from typing import List
def foo(val_a: int, val_b: List[int]):
"""
Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
Parameters
----------
val_a : argument of type int
Lorem ipsum dolor sit amet
val_b : argument of type List(int)
nonumy eirmod tempor invidun
"""
```
## Examples
- An example can be found under examples
### Installing
- pip install docstring-generator
#### Versioning
- For the versions available, see the tags on this repository.
### Authors
- Felix Eisenmenger
### License
- This project is licensed under the MIT License - see the LICENSE.md file for details
نیازمندی
| مقدار | نام |
|---|---|
| >=8.1.3,<9.0.0 | click |
| >=3.9.2,<4.0.0 | strongtyping |
| >=0.3.0,<0.4.0 | strongtyping-pyoverload |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9,<=3.11 | Python |
نحوه نصب
نصب پکیج whl docstring-generator-0.2.2:
pip install docstring-generator-0.2.2.whl
نصب پکیج tar.gz docstring-generator-0.2.2:
pip install docstring-generator-0.2.2.tar.gz