fix: resolve config parsing lint and typing#161
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| repositories = _parse_repositories(config.get("repositories")) | ||
|
|
||
| if org_name is None and not repositories: | ||
| error_msg = ( | ||
| "Error: Provide an organization (--org) " | ||
| "or configure repositories." | ||
| ) | ||
| print(error_msg) # noqa: T201 | ||
| sys.exit(1) |
There was a problem hiding this comment.
Remove org requirement for cache management commands
The new validation always exits when neither an org nor repositories are provided, but cache-management flags (--clear-cache, --clear-expired-cache, --cache-stats) do not require repository context. Running review-tally --clear-cache will now hit this branch and exit with “Provide an organization …” before _handle_cache_operations can run, whereas the previous implementation allowed cache housekeeping without org arguments. The check should be conditional on the absence of cache operations so that cache commands remain usable without unrelated options.
Useful? React with 👍 / 👎.
Summary
Testing
poetry run ruff check .poetry run mypy reviewtally/poetry run pytesthttps://chatgpt.com/codex/tasks/task_e_68fe764c25f88330bbae1323902520b3