You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I seem to hit a conceptualization issue trying to do this. When I reach the FunctionDef, I look for await statements and if there's none, I want to add asyncio.sleep(0) to the last line, I search in the body and try an InsertAfter the last node of the body, but that errors out
Well, the crude method of adding the Expr at the end of body kinda works, but an empty line is inserted as well and it felt clunky
The text was updated successfully, but these errors were encountered:
Just a bit confused somehow, I simply need to use LazyInsertAfter on the last node then Replace the method. I was creating the new ast.AsyncFunctionDef then had context issues with the LazyInsertAfter
I seem to hit a conceptualization issue trying to do this. When I reach the
FunctionDef
, I look forawait
statements and if there's none, I want to addasyncio.sleep(0)
to the last line, I search in the body and try anInsertAfter
the last node of the body, but that errors outWell, the crude method of adding the
Expr
at the end of body kinda works, but an empty line is inserted as well and it felt clunkyThe text was updated successfully, but these errors were encountered: