Skip to content

[AIR] Remove pydoclint ignore for AIR docstrings#63509

Open
pseudo-rnd-thoughts wants to merge 2 commits into
ray-project:masterfrom
pseudo-rnd-thoughts:fix-air-pydoclint
Open

[AIR] Remove pydoclint ignore for AIR docstrings#63509
pseudo-rnd-thoughts wants to merge 2 commits into
ray-project:masterfrom
pseudo-rnd-thoughts:fix-air-pydoclint

Conversation

@pseudo-rnd-thoughts
Copy link
Copy Markdown
Member

Description

#52974 added pydoclint to pre-commit without fixing any issues through adding all the problematic docstrings to an ignore list.
However this means that all the docstrings that do have issues / problems with them that aren't raised or fixed (which is helpful for agents understanding codebases).

This PR removes all of AIR's ignores then uses Claude to fix all the docstrings / type hints (and reviewed by me to confirm implementations).

Signed-off-by: Mark Towers <mark@anyscale.com>
@pseudo-rnd-thoughts pseudo-rnd-thoughts requested a review from a team as a code owner May 19, 2026 16:36
@pseudo-rnd-thoughts pseudo-rnd-thoughts changed the title [AIR] Fix pydoclint [AIR] Remove pydoclint ignore for AIR docstrings May 19, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses numerous docstring violations across the Ray AIR codebase, specifically targeting issues identified by pydoclint. Key changes include adding missing 'Args' and 'Returns' sections, correcting argument names and their order in docstrings to match function signatures, and adding type hints to various function signatures. The reviewer suggested separating the 'Raises' section from the 'Returns' section in the setup_mlflow method to better align with the Google Python Style Guide and improve readability.

Comment thread python/ray/air/_internal/mlflow.py Outdated
Comment on lines +83 to +84
Returns:
Whether setup is successful.
None. Raises ``ValueError`` if setup is not successful.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

It is recommended to use a separate Raises section for exceptions instead of including them in the Returns section. This follows the Google Python Style Guide (which Ray generally follows) and improves readability and consistency with other parts of the codebase, such as RayActorManager.schedule_actor_task.

        Returns:
            None

        Raises:
            ValueError: If setup is not successful.

Signed-off-by: Mark Towers <mark@anyscale.com>
@pseudo-rnd-thoughts pseudo-rnd-thoughts added train Ray Train Related Issue go add ONLY when ready to merge, run all tests labels May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests train Ray Train Related Issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant