Skip to content

Fix missing context import in query.py#128

Merged
jezdez merged 1 commit into
mainfrom
fix-missing-context-import
Apr 14, 2026
Merged

Fix missing context import in query.py#128
jezdez merged 1 commit into
mainfrom
fix-missing-context-import

Conversation

@jezdez
Copy link
Copy Markdown
Member

@jezdez jezdez commented Apr 14, 2026

Summary

Fixes the pre-commit failure on main introduced by #116.

The PR branch was based on an older query.py that already had from conda.base.context import context (needed by check_updates/latest). Between the merge base and main, those functions were moved elsewhere, removing the import. The PR's diff only touched the protect line, so the squash merge applied cleanly against main's slimmed-down query.py without a conflict, but silently dropped the import the new code depends on.

Changes

  • Add from conda.base.context import context to conda_self/query.py

Test plan

  • pre-commit run --all-files passes (ruff F821, mypy name-defined)

The permanent packages setting merged in #116 references
`context.plugins.self_permanent_packages` without importing
`context`, causing ruff F821 and mypy name-defined errors.
@jezdez jezdez merged commit e4324db into main Apr 14, 2026
23 checks passed
@jezdez jezdez deleted the fix-missing-context-import branch April 14, 2026 10:26
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.

1 participant