Skip to content

Collapse ctx.obj/ctx.meta settings split in cli.py - #173

Merged
coordt merged 1 commit into
mainfrom
168-collapse-ctx-settings
Aug 16, 2026
Merged

Collapse ctx.obj/ctx.meta settings split in cli.py#173
coordt merged 1 commit into
mainfrom
168-collapse-ctx-settings

Conversation

@coordt

@coordt coordt commented Aug 16, 2026

Copy link
Copy Markdown
Member

Summary

  • config_show and doctor now read the resolved settings via @click.pass_obj alone, dropping the ctx.meta fallback idiom.
  • The per-field source map is now exposed as Context.sources (a private attr + property, set by build_context()), bundling it with the rest of the resolved settings instead of a separate Click channel.

Closes #168

Test plan

  • uv run pytest -q (269 passed)
  • uv run mypy/pyright clean on changed files
  • uv run ruff check clean
  • Foreground code-review pass (medium effort); two low-severity findings noted (redundant build_context() tuple return, _sources set post-construction) — out of scope for this ticket, would require touching settings.py's broader public API and its many test callers.

config_show and doctor read the per-field source map via Context.sources
now, alongside the rest of the resolved settings on ctx.obj, instead of
a second ctx.meta lookup.
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callowayproject.github.io/wiki-toolkit/pr-preview/pr-173/

Built to branch gh-pages at 2026-08-16 20:35 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

Copy link
Copy Markdown
Contributor

Version hint: patch
Current version: 0.29.2
New version (when merged): 0.29.3

Comment ID: Display version hint-auto-generated

@coordt
coordt merged commit ca44307 into main Aug 16, 2026
7 checks passed
@coordt
coordt deleted the 168-collapse-ctx-settings branch August 16, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collapse ctx.obj / ctx.meta settings split in cli.py

1 participant