Skip to content

Conversation

BobTheBuidler
Copy link
Contributor

@BobTheBuidler BobTheBuidler commented Oct 18, 2025

fixes mypyc/mypyc#1151

I'm not entirely sure what the difference is between emit_attribute_error and the code block that I edited

I'm not sure if we need to update both cases, but I know we do need to handle it in this one
@BobTheBuidler BobTheBuidler marked this pull request as draft October 18, 2025 06:20
attr.removeprefix(GENERATOR_ATTRIBUTE_PREFIX),
op.traceback_entry[1],
globals_static,
if class_ir.is_generated:
Copy link
Contributor Author

@BobTheBuidler BobTheBuidler Oct 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put this here so it will do its job in any place emit_attribute_error might be used in the future, it didn't seem appropriate to add another helper but this doesn't really seem appropriate either

@BobTheBuidler BobTheBuidler marked this pull request as ready for review October 18, 2025 08:40
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.

UnboundLocalError in async context incorrectly raises AttributeError

1 participant