mirror of
https://github.com/katanemo/plano.git
synced 2026-05-10 08:12:48 +02:00
`up()` had a redundant inline `import yaml` (line 444) even though `yaml` is already imported at the module top (line 9). Python's compile-time scope analysis turned `yaml` into a function-local for the entire body, which was harmless until #890 added `yaml.safe_dump(...)` earlier in the same function (in the synthesized-default-config branch). After #890, running `planoai up` in any directory without a config file crashes with: UnboundLocalError: cannot access local variable 'yaml' where it is not associated with a value File "cli/planoai/main.py", line 388, in up yaml.safe_dump(cfg_dict, fh, sort_keys=False) Removing the redundant inline import lets the module-level `yaml` resolve normally on both code paths. |
||
|---|---|---|
| .. | ||
| obs | ||
| templates | ||
| __init__.py | ||
| chatgpt_auth.py | ||
| chatgpt_cmd.py | ||
| config_generator.py | ||
| consts.py | ||
| core.py | ||
| defaults.py | ||
| docker_cli.py | ||
| init_cmd.py | ||
| main.py | ||
| native_binaries.py | ||
| native_runner.py | ||
| obs_cmd.py | ||
| rich_click_config.py | ||
| targets.py | ||
| template_sync.py | ||
| trace_cmd.py | ||
| trace_listener_runtime.py | ||
| utils.py | ||
| versioning.py | ||