mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-17 00:20:51 +00:00
fix(python): give folder modules an empty __path__ so relative imports resolve to workspace scripts (#12307)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
949ef234a8
commit
0323310d64
+21
@@ -38,3 +38,24 @@ def main():
|
||||
'',
|
||||
'',
|
||||
'f/system_relative/nested_script', 12348, 'python3', '');
|
||||
|
||||
-- Named after files in the job dir (loader.py) and after the running script's folder (f/system/).
|
||||
INSERT INTO public.script(workspace_id, created_by, content, schema, summary, description, path, hash, language, lock) VALUES (
|
||||
'test-workspace',
|
||||
'test-user',
|
||||
'from .different_folder_script import main
|
||||
',
|
||||
'{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"required":[],"type":"object"}',
|
||||
'',
|
||||
'',
|
||||
'f/system_relative/loader', 12349, 'python3', '');
|
||||
|
||||
INSERT INTO public.script(workspace_id, created_by, content, schema, summary, description, path, hash, language, lock) VALUES (
|
||||
'test-workspace',
|
||||
'test-user',
|
||||
'from .different_folder_script import main
|
||||
',
|
||||
'{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"required":[],"type":"object"}',
|
||||
'',
|
||||
'',
|
||||
'f/system_relative/system', 12350, 'python3', '');
|
||||
|
||||
Reference in New Issue
Block a user