Skip to content

docs(naming): add missing docstrings to filename utility functions#771

Open
RavSinghChandan wants to merge 1 commit into
huggingface:mainfrom
RavSinghChandan:docs/add-missing-docstrings-naming
Open

docs(naming): add missing docstrings to filename utility functions#771
RavSinghChandan wants to merge 1 commit into
huggingface:mainfrom
RavSinghChandan:docs/add-missing-docstrings-naming

Conversation

@RavSinghChandan

Copy link
Copy Markdown

Summary

Five public functions in src/evaluate/naming.py had 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):

Function What was added
filename_prefix_for_name Args, Returns, Raises, Example
filename_prefix_for_split Args, Returns, Raises, Example
filepattern_for_dataset_split Args, Returns, Example
filename_for_dataset_split Args, Returns, Example
filepath_for_dataset_split Args, Returns, cross-reference to helper, Example

No logic changes

Documentation only — no behaviour was modified.

CI checks

  • black --check
  • isort --check-only
  • flake8

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>
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.

1 participant