Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mypy errors in src/codegen/gscli/generate/system_prompt.py #995

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

codegen-sh[bot]
Copy link
Contributor

@codegen-sh codegen-sh bot commented Mar 31, 2025

This PR fixes mypy errors in the src/codegen/gscli/generate/system_prompt.py file by:

  1. Adding proper type hints to functions and variables:

    • Added return type annotations to functions
    • Added type annotation for the mint variable
    • Added parameter type annotation for the name parameter in get_group
    • Used capitalized type names from the typing module (List, Dict, etc.)
  2. Improving error handling:

    • Added explicit return None in the get_group function
    • Added filtering of None values in the render_groups function
  3. Adding docstrings to functions that were missing them:

    • Added docstrings to render_page, render_group, get_group, and render_groups

These changes improve type safety and code clarity without changing the functionality of the code.

Note: This is a small PR focused only on fixing mypy errors in the system_prompt.py file as requested.

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.

0 participants