sourcery icon indicating copy to clipboard operation
sourcery copied to clipboard

Incorrect structure when generating docstrings

Open xshapira opened this issue 1 year ago • 2 comments

Description

When generating docstrings, the output has an incorrect structure.

Sourcery output

def run_quiz_gpt(chat_model, docs=None, topic=None):
    """Runs a quiz using the GPT chat model.

    Args:
        chat_model: The GPT chat model.
        docs: Optional. The list of documents to use for the quiz.
        topic: Optional. The topic to search on Wikipedia.

    If `docs` is not provided, the user can choose to upload a file or search for a Wikipedia article.
    If no `docs` are available, a markdown file with quiz instructions is displayed.
    Otherwise, the quiz is run using the provided `docs` and `topic` or file name.
    The user can answer each question and submit the quiz.

    Returns:
        None
    """
    # Function implementation

Expected output

def run_quiz_gpt(chat_model, docs=None, topic=None):
    """Runs a quiz using the GPT chat model.

    If `docs` is not provided, the user can choose to upload a file or search for a Wikipedia article.
    If no `docs` are available, a markdown file with quiz instructions is displayed.
    Otherwise, the quiz is run using the provided `docs` and `topic` or file name.
    The user can answer each question and submit the quiz.

    Args:
        chat_model: The GPT chat model.
        docs: Optional. The list of documents to use for the quiz.
        topic: Optional. The topic to search on Wikipedia.

    Returns:
        None
    """
    # Function implementation

xshapira avatar Jan 17 '24 14:01 xshapira

Hi @xshapira - thanks for raising.

Are there particular types of function that this is happening with or is it happening every time (or randomly)?

Hellebore avatar Jan 18 '24 08:01 Hellebore

@Hellebore Randomly.

xshapira avatar Jan 18 '24 12:01 xshapira