Skip to content

fix: raise for missing context keys#231

Merged
xelandernt merged 1 commit into
mainfrom
missing-context-key
Jul 13, 2026
Merged

fix: raise for missing context keys#231
xelandernt merged 1 commit into
mainfrom
missing-context-key

Conversation

@xelandernt

@xelandernt xelandernt commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Make missing global-context keys raise consistently when requested.

Changes

  • Check key membership before returning a value.
  • Preserve stored None values and caller defaults.
  • Added non-empty-context missing-key regression coverage.

Checklist

  • Lint and format pass (ruff)
  • Tests pass and new behavior is covered
  • Build succeeds (uv build) if packaging or build config changed
  • Docs updated if behavior or public API changed
  • Repo metadata stays consistent across the three surfaces (GitHub description, pyproject description, profile blurb) if this touches packaging

@xelandernt xelandernt self-assigned this Jul 13, 2026
@xelandernt xelandernt added the bug Something isn't working label Jul 13, 2026
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
tests/providers/test_context_resources.py 100.00% <100.00%> (ø)
that_depends/providers/context_resources.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xelandernt xelandernt merged commit 755dcfb into main Jul 13, 2026
12 checks passed
@xelandernt xelandernt deleted the missing-context-key branch July 13, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant