Skip to content

fix: prefer current workspace for update - #57

Open
Huoyanlifusu wants to merge 1 commit into
abhiksark:mainfrom
Huoyanlifusu:fix/update-current-workspace
Open

fix: prefer current workspace for update#57
Huoyanlifusu wants to merge 1 commit into
abhiksark:mainfrom
Huoyanlifusu:fix/update-current-workspace

Conversation

@Huoyanlifusu

@Huoyanlifusu Huoyanlifusu commented Aug 15, 2026

Copy link
Copy Markdown

Fixes #42

Summary

  • preserve whether update --path was explicitly provided
  • honor the target precedence: --path, global --root, current workspace, then the default home workspace
  • reuse the existing workspace resolver without creating a missing workspace

Previously, bare pythonlings update always received the default home path from argparse, so it could update ~/.pythonlings even when run inside another valid workspace.

Tests

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .venv/bin/python -m pytest -p pytest_asyncio.plugin tests/integration tests/unit -q
  • Result: 113 passed
  • Manually verified that bare pythonlings update updates the current workspace while leaving the home workspace unchanged

Screenshots

Not applicable — this changes CLI workspace resolution only.

Checklist

  • Documentation not required because the command syntax is unchanged
  • Added or updated tests
  • Verified python -m pytest -q

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 44416cf8-2366-47af-9ab5-23643eaf9268


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

fix: make pythonlings update prefer the current workspace

1 participant