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/backend/typestub_utils.py file by:

  1. Adding proper type hints for functions and methods that handle AST nodes
  2. Using Union from typing instead of the pipe operator for better compatibility
  3. Adding type safety by checking if AST nodes are of the expected type before accessing attributes
  4. Adding a type variable for AST nodes to improve type checking
  5. Adding explicit type casting in the _strip_internal_symbols function

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