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

Use Google style docstrings #189

Closed
mscroggs opened this issue Aug 11, 2023 · 0 comments · Fixed by #208
Closed

Use Google style docstrings #189

mscroggs opened this issue Aug 11, 2023 · 0 comments · Fixed by #208
Labels

Comments

@mscroggs
Copy link
Member

mscroggs commented Aug 11, 2023

I suggest that we move to using Google style docstrings rather than Numpy style. The Google formatted strings are usually multiple lines shorter, and work more nicely with type hints.

Example Google docstring (proposed):

def element(family: str, cell: str, degree: int) -> FiniteElement:
    """"Create a finite element.

    Args:
        family: The element family
        cell: The cell
        degree: The polynomial degree
    """

Example Numpy docstring:

def element(family: str, cell: str, degree: int) -> FiniteElement:
    """"Create a finite element.

    Parameters
    -----------
    family: str
        The element family
    cell: str
        The cell
    degree: int
        The polynomial degree
    """
This was referenced Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Aims & design principles
Development

Successfully merging a pull request may close this issue.

1 participant