Skip to content

Conversation

@EdwardJXLi
Copy link
Contributor

@EdwardJXLi EdwardJXLi commented Feb 6, 2025

This allows us to do isinstance(symbol, list) instead of isinstance(symbol, codegen.sdk.core.List)

This applies to changes to:

  • List
  • Dict
  • Tuple
  • String
  • Number
  • Boolean

@EdwardJXLi EdwardJXLi requested review from a team and codegen-team as code owners February 6, 2025 22:04
@EdwardJXLi EdwardJXLi requested review from christinewangcw and removed request for a team February 6, 2025 22:04
@codecov
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files

@EdwardJXLi EdwardJXLi changed the title Experiment: Override __class__ for List and Dict types to shadow isinstance Experiment: Override __class__ for Builtin types to shadow isinstance Feb 7, 2025
@EdwardJXLi EdwardJXLi merged commit a9f81ea into develop Feb 7, 2025
23 of 24 checks passed
@EdwardJXLi EdwardJXLi deleted the eli-misc-cursed-types branch February 7, 2025 20:14
jayhack pushed a commit that referenced this pull request Feb 9, 2025
…nce` (#347)

This allows us to do `isinstance(symbol, list)` instead of
`isinstance(symbol, codegen.sdk.core.List)`

This applies to changes to:
- List
- Dict
- Tuple
- String
- Number
- Boolean
@github-actions
Copy link
Contributor

🎉 This PR is included in version 0.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

tkfoss pushed a commit that referenced this pull request Feb 10, 2025
…nce` (#347)

This allows us to do `isinstance(symbol, list)` instead of
`isinstance(symbol, codegen.sdk.core.List)`

This applies to changes to:
- List
- Dict
- Tuple
- String
- Number
- Boolean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants