plano/cli/planoai
Musa 92f82a9c68
fix(cli): drop function-local import yaml shadowing module global in up (#916)
`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.
2026-04-24 16:18:11 -07:00
..
obs Improve obs model name matching, latency metrics, and error reporting (#900) 2026-04-18 21:21:15 -07:00
templates Run plano natively by default (#744) 2026-03-05 07:35:25 -08:00
__init__.py Bump version to 0.4.21 (#911) 2026-04-24 14:27:32 -07:00
chatgpt_auth.py Add first-class ChatGPT subscription provider support (#881) 2026-04-23 15:34:44 -07:00
chatgpt_cmd.py Add first-class ChatGPT subscription provider support (#881) 2026-04-23 15:34:44 -07:00
config_generator.py fix(routing): auto-migrate v0.3.0 inline routing_preferences to v0.4.0 top-level (#912) 2026-04-24 12:31:44 -07:00
consts.py Bump version to 0.4.21 (#911) 2026-04-24 14:27:32 -07:00
core.py Update black hook for Python 3.14 (#857) 2026-03-31 13:18:45 -07:00
defaults.py feat(providers): add Vercel AI Gateway and OpenRouter support (#902) 2026-04-23 15:54:39 -07:00
docker_cli.py Run plano natively by default (#744) 2026-03-05 07:35:25 -08:00
init_cmd.py Introduce brand new CLI experience with tracing and quickstart (#724) 2026-02-10 13:17:43 -08:00
main.py fix(cli): drop function-local import yaml shadowing module global in up (#916) 2026-04-24 16:18:11 -07:00
native_binaries.py Use editable install to fix sdist build failure (#805) 2026-03-05 13:50:50 -08:00
native_runner.py Add first-class ChatGPT subscription provider support (#881) 2026-04-23 15:34:44 -07:00
obs_cmd.py planoai obs: live LLM observability TUI (#891) 2026-04-17 14:03:47 -07:00
rich_click_config.py planoai obs: live LLM observability TUI (#891) 2026-04-17 14:03:47 -07:00
targets.py Update black hook for Python 3.14 (#857) 2026-03-31 13:18:45 -07:00
template_sync.py sync CLI templates with demo configs via manifest + CI flow (#764) 2026-02-17 12:59:09 -08:00
trace_cmd.py add support for background trace collection and tracing output (#749) 2026-02-24 19:17:33 -08:00
trace_listener_runtime.py add support for background trace collection and tracing output (#749) 2026-02-24 19:17:33 -08:00
utils.py Fix request closures during long-running streaming (#899) 2026-04-18 21:20:34 -07:00
versioning.py Introduce brand new CLI experience with tracing and quickstart (#724) 2026-02-10 13:17:43 -08:00