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

Remove types from docstrings #627

Closed
DaniBodor opened this issue Jul 9, 2024 · 3 comments · Fixed by #628
Closed

Remove types from docstrings #627

DaniBodor opened this issue Jul 9, 2024 · 3 comments · Fixed by #628
Assignees
Labels
docs Improvements or additions to documentation

Comments

@DaniBodor
Copy link
Collaborator

According to the Google convention, functions with type hinted arguments do not need to have the types inside the docstring (see example below). I think the same is true for whether or not they are optional.

Currently, most of our docstrings do have the types (and optionality) annotated, despite them all being type hinted already. This makes them a bit clunky and lengthy.

Do we want to update these or leave them as is?

def function_with_pep484_type_annotations(param1: int, param2: str) -> bool:
    """Example function with PEP 484 type annotations.

    Args:
        param1: The first parameter.
        param2: The second parameter.

    Returns:
        The return value. True for success, False otherwise.
    """
@DaniBodor DaniBodor added the docs Improvements or additions to documentation label Jul 9, 2024
@gcroci2
Copy link
Collaborator

gcroci2 commented Jul 10, 2024

It's a nice improvement :) I'd say it's not a priority and as it is does not limit the usage or the clarity of the docs, but up to you if you wish to pick this up.

@DaniBodor DaniBodor linked a pull request Jul 12, 2024 that will close this issue
@DaniBodor DaniBodor self-assigned this Jul 12, 2024
@gcroci2 gcroci2 moved this to In progress in Development Jul 12, 2024
@DaniBodor
Copy link
Collaborator Author

For some reason the issues associated to my PRs are not automatically closing when the PR gets merged. @gcroci2 , any idea why?

@github-project-automation github-project-automation bot moved this from In progress to Done in Development Jul 12, 2024
@gcroci2
Copy link
Collaborator

gcroci2 commented Jul 12, 2024

I think that the old project kanban had automation broken, but this new one seems to work @DaniBodor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants