Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Parameter descriptions and typing #50

Closed
trickeydan opened this issue Feb 5, 2019 · 2 comments · Fixed by #725
Closed

Parameter descriptions and typing #50

trickeydan opened this issue Feb 5, 2019 · 2 comments · Fixed by #725
Assignees
Labels
documentation Documentation
Milestone

Comments

@trickeydan
Copy link
Contributor

e.g

def format_unit(value, unit):
    """
    Formats the given value as a human readable string using the given units.

    :param float|int value: a numeric value
    :param str unit: the unit for the value (kg, m, etc.)
    :rtype: str
    """
    return '{} {}'.format(value, unit)

We should consider this: https://pypi.org/project/sphinx-autodoc-typehints/

@trickeydan trickeydan added the documentation Documentation label Feb 5, 2019
@trickeydan trickeydan added this to the Ready for a Competition milestone Feb 5, 2019
@trickeydan trickeydan modified the milestones: Ready for a Competition, v0.2.0 Mar 7, 2019
@trickeydan trickeydan modified the milestones: v0.2.0, v0.6.0 Apr 8, 2019
@mildlyincompetent mildlyincompetent self-assigned this May 30, 2019
@trickeydan trickeydan removed this from the v0.6.0 milestone Jun 9, 2019
@sedders123
Copy link
Member

I'm adding this to the Pre-1.0.0 milestone. My reasoning is that if you call help() providing a class, function or property Python will display the relevant docstring. This could help both competitors and implementors to discover more of the API without having to refer to the docs.

Happy to discuss this addition if anyone disagrees.

@sedders123 sedders123 added this to the Pre-1.0.0 milestone Jul 29, 2020
@trickeydan
Copy link
Contributor Author

Darglint is likely to be very helpful with this.

I've been unable to configure it exactly how we want, so some upstream contributions may be needed.

@trickeydan trickeydan self-assigned this Jul 17, 2021
@trickeydan trickeydan modified the milestones: Pre-1.0.0, 1.0.0b1 Jul 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants