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 directory #994

Draft
wants to merge 3 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 directory by:

  1. Adding proper type hints to functions and variables in commands.py:

    • Added return type annotations to functions
    • Added type annotations for variables like python_set, typescript_set, core_set, and mint_data
    • Added docstrings to functions that were missing them
    • Replaced exit(1) with sys.exit(1) for better type checking
  2. Adding proper type hints to functions and variables in runner_imports.py:

    • Added return type annotations to functions
    • Added type annotations for variables like to_add and gs_public_imports
    • Used proper capitalized type names from the typing module (List, Set, Dict)
  3. Adding proper type hints to functions and variables in utils.py (from a previous commit):

    • Added return type annotation to generate_builtins_file
    • Added type annotation for unique_imports

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

Note: This is a small PR focused only on fixing mypy errors in the generate directory 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