We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
add_import
Not sure what's actually causing the failure, but failure appears when there are no other nodes except for the node to be changed
language python class_definition($name, $body) as $C where { $name <: `Config`, $body <: block($statements), $t = "", $statements <: some bubble($t) assignment(left=$x, right=$y) as $A where { $t += `$x=$y,` }, $C => `ConfigDict($t)`, add_import(source="pydantic", name="ConfigDict") }
Fails on this code:
class Config: a: int = 2 b: float = 5
Transforms to:
from pydantic import ConfigDict class Config: a: int = 2 b: float = 5
But works correctly if i add a comment node
# hello <--- Addnig a comment class Config: a: int = 2 b: float = 5
With output:
from pydantic import ConfigDict # hello ConfigDict(a=2,b=5,)
The text was updated successfully, but these errors were encountered:
It seems like this is only an issue in the studio, as it works fine in a test.
In realiy, I assume files with only a single node are very rare.
Sorry, something went wrong.
No branches or pull requests
Not sure what's actually causing the failure, but failure appears when there are no other nodes except for the node to be changed
Fails on this code:
Transforms to:
But works correctly if i add a comment node
With output:
The text was updated successfully, but these errors were encountered: