mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-20 08:01:35 +00:00
fix: do not split main.py on 'def main' (#5895)
doesn't work well in edge cases:
```
@schedule(
bla=True
)
def main(x: str):
return x
```
```
error_message = """
Please ensure you have defined main(username, password) correctly.
The function def main( should be at the end.
"""
def main(x: str):
return x
```
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
This commit is contained in:
@@ -391,7 +391,7 @@ async fn parse_python_imports_inner(
|
||||
})
|
||||
.join("\n")
|
||||
.parse::<toml::Table>()
|
||||
.map_err(to_anyhow)?;
|
||||
.map_err(to_anyhow)?;
|
||||
|
||||
{
|
||||
if let Some(v) = metadata.get("requires-python").and_then(|v| v.as_str()) {
|
||||
|
||||
Reference in New Issue
Block a user