Closed
Description
If modal function fn_a
calls modal function fn_b
, and fn_b
also calls fn_a
, pyright gets confused!
The screenshot is from what I think is a MWE of this bug:
import modal
app = modal.App()
@app.function()
def fn_a(call_b: bool = True):
if call_b:
fn_b.remote()
return
@app.function()
def fn_b():
fn_a.remote(call_b=False)
@app.local_entrypoint()
def main():
fn_a.remote()
The program above ia valid and runs fine, but my IDE is having a problem with something. The issue is cryptic - fn_a.remote
appears to the IDE to be undefined - but only when both functions call each other! If the functions don't both call each other, either one can call either one with .remote
with no issues.
Using VS Code, Python 3.12.
Metadata
Metadata
Assignees
Labels
No labels