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

Wrapping doesn't work at all when there is an argument list? #174

Open
benjamin-kirkbride opened this issue Apr 9, 2023 · 1 comment
Open
Labels
C: stakeholder Relates to docformatter stakeholder requested behavior question Questions related to docformatter
Milestone

Comments

@benjamin-kirkbride
Copy link

I may be ignorant or missing something. Here are some examples:

    """Split audio at silences to keep under the size limit.

    It's important to split near the middle of a silent section to prevent splitting on a spoken word and causing
    issues with transcription and diarization.

    Args:
        silent_sections: list of silent sections in ms.
        duration: total length of audio in ms
        audio_size: total size of audio file in bytes
        max_file_size: maximum file size that may exist after splits

    Returns:
        List of points in ms to use to split the audio file into chunks.
    """

Running docformatter on the above does nothing, unless I specify --force-wrap which does what I want for the long line, but botches the argument list:

    """Split audio at silences to keep under the size limit.

    It's important to split near the middle of a silent section to
    prevent splitting on a spoken word and causing issues with
    transcription and diarization.

    Args:     silent_sections: list of silent sections in ms.
    duration: total length of audio in ms     audio_size: total size of
    audio file in bytes     max_file_size: maximum file size that may
    exist after splits

    Returns:     List of points in ms to use to split the audio file
    into chunks.
    """

Compare to what happens if I remove the lists, and also remove --force-wrap:

    """Split audio at silences to keep under the size limit.

    It's important to split near the middle of a silent section to
    prevent splitting on a spoken word and causing issues with
    transcription and diarization.
    """

Is wrapping all or nothing; if there are lists no lines get wrapped? Or are my arg/returns lists malformed? Any insight is appreciated!

@github-actions github-actions bot added the fresh This is a new issue label Apr 9, 2023
@weibullguy
Copy link
Member

docformatter doesn't know how to handle various directives at the moment. It's the next "big thing" I plan to work on. See #58, #60, #68, and #78.

@weibullguy weibullguy added question Questions related to docformatter and removed fresh This is a new issue labels Apr 10, 2023
@weibullguy weibullguy added the C: stakeholder Relates to docformatter stakeholder requested behavior label Apr 25, 2023
@weibullguy weibullguy added this to the v1.8.0 milestone May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: stakeholder Relates to docformatter stakeholder requested behavior question Questions related to docformatter
Projects
None yet
Development

No branches or pull requests

2 participants