Skip to content

Conversation

@codegen-sh
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