heavenshell / vim-pydocstring

Generate Python docstring to your Python source code.
BSD 3-Clause "New" or "Revised" License
337 stars 53 forks source link

Disable "type" and "rtype" Lines #58

Closed ZaydH closed 5 years ago

ZaydH commented 5 years ago

I have a function with types in the definition like:

def my_func(x: str, y:str) -> str:

My preference would be for the generated docstring to not have the lines type and rtype (type are a bit redundant). I looked in the docs for a way to disable those lines being generated, but I could not find it. Is there a way to do this?

heavenshell commented 5 years ago

@ZaydH

Sorry for my bad english understand. you do not want to generate type and rtype?

You can modify templates.

:param {{args}}: """


- `template/pydocstring/arg.txt`

{{name}}:


- result
```python

def my_func(x: str, y:str) -> str:
    """my_func

    :param x:
    :param y:
    """
    pass