Skip to content

docs: add Google-style docstrings to errors.py classes#51

Open
Rudrani-Mukherjee wants to merge 2 commits into
Hell1213:mainfrom
Rudrani-Mukherjee:docs/add-docstrings-errors
Open

docs: add Google-style docstrings to errors.py classes#51
Rudrani-Mukherjee wants to merge 2 commits into
Hell1213:mainfrom
Rudrani-Mukherjee:docs/add-docstrings-errors

Conversation

@Rudrani-Mukherjee
Copy link
Copy Markdown

Summary

Added Google-style docstrings to all public classes and methods in utils/errors.py.

Changes

  • Added class docstring to AgentError with Attributes section
  • Added docstrings to __init__, __str__, to_dict methods
  • Added class docstring to ConfigError with Attributes section
  • Added docstring to ConfigError.__init__ method

Related Issue

Closes #30

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactoring
  • Test changes
  • CI/Chore

Testing

  • uv run ruff check passes
  • uv run mypy passes
  • uv run pytest passes
  • Manual testing done

Description

Added Google-style docstrings to AgentError and ConfigError classes in utils/errors.py which were missing documentation.

Copy link
Copy Markdown
Owner

@Hell1213 Hell1213 left a comment

Choose a reason for hiding this comment

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

Review: Google-style docstrings for errors.py

Hi @Rudrani-Mukherjee, thanks for the PR! The docstrings are well-written.

Minor: The file is missing a trailing newline at the end (line 87 ends without \n). Not a blocker with current ruff config (only E9,F enabled), but consider adding it.

Note: PR #55 by @Aashita101 also addresses the same issue (#30) with a slightly different docstring style. Both PRs modify utils/errors.py and will conflict. You may want to coordinate – or the maintainers will pick one.

Tests pass, no lint issues.

Copy link
Copy Markdown
Owner

@Hell1213 Hell1213 left a comment

Choose a reason for hiding this comment

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

Docstrings look clean and follow Google format. Nice work.

@Rudrani-Mukherjee
Copy link
Copy Markdown
Author

@Hell1213 Thank you for the review! Added the trailing newline at end of errors.py. Ready for merge

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.

Add docstrings to public functions in utility modules

2 participants