17

I'm working in a jupyter notebook using python and trying to use the auto-documentation function to generate docstrings like below. When working in an IDE like pycharm a triple quotation + Enter underneath the function generates docstrings like shown below.

def test_function(df: pd.DataFrame, probs: dict) -> int:
    """
    :param df: 
    :param probs: 
    :return: 
    """

Currently my output from the notebook gives the output below and does not parse any arguments inside the function.

def test_function(df: pd.DataFrame, probs: dict) -> int:
    """

    """
  • 1
    try https://stackoverflow.com/questions/54594779/is-there-a-docstring-autocompletion-tool-for-jupyter-notebook – matan h Nov 22 '20 at 15:18

1 Answers1

1

You can have that functionality in VScode, sublime, pytorch and other IDEs but not in jupyter the closest solution I found was to install nbextensions and use snippets to add a docstring template. it decreases typing by 50% but still not auto generating.

sh.e.salh
  • 508
  • 2
  • 5
  • 16