Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect structure when generating docstrings #413

Open
xshapira opened this issue Jan 17, 2024 · 2 comments
Open

Incorrect structure when generating docstrings #413

xshapira opened this issue Jan 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@xshapira
Copy link

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 xshapira added the bug Something isn't working label Jan 17, 2024
@Hellebore
Copy link
Collaborator

Hi @xshapira - thanks for raising.

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

@xshapira
Copy link
Author

@Hellebore Randomly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants