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

Reformat and recomment code for mkdocstring #39

Open
christopolise opened this issue Aug 24, 2023 · 1 comment
Open

Reformat and recomment code for mkdocstring #39

christopolise opened this issue Aug 24, 2023 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@christopolise
Copy link
Contributor

christopolise commented Aug 24, 2023

mkdocstring is a great plugin for mkdocs which analyzes comments and generates documentation for the code. As can be seen in 1ae6fb0 the comments need to be modified so that every function/class conforms to the following format:

def example_def(val1, val2, opt1):
    """
    Brief explanation of what the function does

    Args:
        val1 (int): Description of this var
        val2 (str): Description of this var
        opt1 (bool): Description of this option

    Returns:
        (list): Returns a list as a result
    """

    # Function code here # 
    ...

I am sure this will only need to be done for the code that acts as an API (i.e. display objects, controllers, broadcasters, etc.) but if we could all just take a sec and reformat that this, it will make the documentation much more usable.

Thanks!

@christopolise christopolise added documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed labels Aug 24, 2023
@christopolise
Copy link
Contributor Author

Also it turns out we could do the following type of commenting as well if putting the type in parentheses is annoying:

def example_def(val1: int, val2: str, opt1: bool) -> list:
    """
    Brief explanation of what the function does

    Args:
        val1: Description of this var
        val2: Description of this var
        opt1: Description of this option

    Returns:
        Returns a list as a result
    """

    # Function code here # 
    ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants