docs(naming): add missing docstrings to filename utility functions#771
Open
RavSinghChandan wants to merge 1 commit into
Open
docs(naming): add missing docstrings to filename utility functions#771RavSinghChandan wants to merge 1 commit into
RavSinghChandan wants to merge 1 commit into
Conversation
Five public functions in `src/evaluate/naming.py` had no docstrings, making their expected inputs, outputs, and error conditions invisible to IDE tooling and to contributors reading the API reference: - `filename_prefix_for_name`: documents the `name` arg, return value, ValueError condition, and adds a usage example - `filename_prefix_for_split`: documents both args, the combined prefix format, both ValueError conditions, and adds a usage example - `filepattern_for_dataset_split`: documents all four args (including the optional suffix), the glob-wildcard return format, and adds an example - `filename_for_dataset_split`: documents all three args and return value with an example - `filepath_for_dataset_split`: documents all four args, the relationship to `filename_for_dataset_split`, and adds an example No logic was changed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Five public functions in
src/evaluate/naming.pyhad no docstrings at all, making their expected inputs, outputs, and error conditions invisible to IDE tooling and to contributors reading the source.This PR adds complete docstrings following the existing HuggingFace style used throughout the codebase (Google-style with backtick-formatted types):
filename_prefix_for_nameArgs,Returns,Raises,Examplefilename_prefix_for_splitArgs,Returns,Raises,Examplefilepattern_for_dataset_splitArgs,Returns,Examplefilename_for_dataset_splitArgs,Returns,Examplefilepath_for_dataset_splitArgs,Returns, cross-reference to helper,ExampleNo logic changes
Documentation only — no behaviour was modified.
CI checks
black --check✅isort --check-only✅flake8✅