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

feat(python): Support Adding Statements to Classes and Methods #4949

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

noanflaherty
Copy link
Collaborator

With this, we can now add statements to classes and methods in the python ast.


exports[`class > should generate a class with local classes 1`] = `
"class OuterClass:
class InnerClass(ParentClass):
Copy link
Collaborator

Choose a reason for hiding this comment

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

[q] where does ParentClass come from? Are we missing an import statement, or is that oos for this PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Imports only get resolved within the context of a PythonFile being written.

@noanflaherty noanflaherty enabled auto-merge (squash) October 18, 2024 23:17
@noanflaherty noanflaherty merged commit cfd1918 into main Oct 18, 2024
50 checks passed
@noanflaherty noanflaherty deleted the noa/support-arbitrary-statements branch October 18, 2024 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants