Skip to content

[Docstrings][Maintenance] Unify tuple docstrings formatting#3100

Merged
ew3361zh merged 13 commits into
devfrom
tuple-docstrings
Jun 17, 2026
Merged

[Docstrings][Maintenance] Unify tuple docstrings formatting#3100
ew3361zh merged 13 commits into
devfrom
tuple-docstrings

Conversation

@ew3361zh

Copy link
Copy Markdown
Collaborator

Context

Issue(s) closed by this pull request: closes #3038

What

Aligns all tuple return docstrings to the same format:

tuple[thing1, thing2]
    - Thing1 description
    - Thing2 description

Why

Looks better and easier and more consistent to understand.

How

Findall for -> tuple[ and then went into the docstrings where applicable.

Test plan

N/A no code changes.

Input Changes

Output Changes

  • N/A

Filter

@github-actions

Copy link
Copy Markdown
Contributor

Current Coverage: 99%

Mypy errors on tuple-docstrings branch: 1138
Mypy errors on dev branch: 1144
6 fewer errors on tuple-docstrings branch

@matthew7838 matthew7838 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just minor comments.

Comment thread RUFAS/biophysical/animal/animal.py Outdated
A tuple where the first element indicates whether the life stage has changed or remains the same,
and the second element is always None.
- Whether the life stage has changed or remains the same.
- Always None to align with the ``ANIMAL_TYPE_TO_LIFE_STAGE_UPDATE_METHOD_MAP`` mapping format.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the above comment.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one is always none based on the previous way the return docstring was written and there is no alternative to None here. I will check the others as well though to make sure they're all correct.

Comment thread RUFAS/biophysical/field/field/field.py Outdated

@allisterakun allisterakun left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good, just some minor comments!

Comment thread RUFAS/biophysical/field/field/field.py Outdated
Comment thread RUFAS/data_validator.py Outdated
Comment thread RUFAS/data_validator.py Outdated
Comment thread RUFAS/data_validator.py Outdated
Comment thread RUFAS/data_validator.py Outdated
Comment thread RUFAS/data_validator.py Outdated
Comment thread RUFAS/data_validator.py Outdated
@ew3361zh ew3361zh merged commit 9258a83 into dev Jun 17, 2026
1 check passed
@ew3361zh ew3361zh deleted the tuple-docstrings branch June 17, 2026 17:55
@github-actions

Copy link
Copy Markdown
Contributor

Current Coverage: 99%

Mypy errors on tuple-docstrings branch: 1138
Mypy errors on dev branch: 1144
6 fewer errors on tuple-docstrings branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Maintenance][Docstrings] Align return format for tuple types

3 participants