Skip to content

Google-style docstrings #267

@ssweber

Description

@ssweber

This is not a 'must', and let me know if me bringing this up is annoying!

but I want your opinion, because I figured out how converting from current sphinx style to google-style would be fairly easy.

Currently our docs look like:

class ProgressBar:
    def __init__(self, title: str, max_value: int = 100, hide_delay: int = 100):
        """
        Creates a progress bar window with a message label and a progress bar.

        The progress bar is updated by calling the `update` method to update the
        progress in incremental steps until the `close` method is called.

        :param title: Title of the window
        :param max_value: Maximum value of the progress bar
        :param hide_delay: Delay in milliseconds before displaying the Window
        :returns: None
        """

Google-style:

class ProgressBar:
    def __init__(self, title: str, max_value: int = 100, hide_delay: int = 100):
        """Creates a progress bar window with a message label and a progress bar.

        The progress bar is updated by calling the `update` method to update the
        progress in incremental steps until the `close` method is called.

        Args:
            title: Title of the window
            max_value: Maximum value of the progress bar
            hide_delay: Delay in milliseconds before displaying the Window

        Returns:
            None
        """

The reason I'm bringing this up, is switching would allow us to easily add admonitions that get formatted by mkdocstrings:

image
image

As a plus, alot of the param lines we currently have to wrap to fit under 88 could all fit on 1 line instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions