Skip to content

Add option to automatically update requirements.txt file#71

Merged
simion merged 2 commits intosimion:masterfrom
danifr:update_requirements
Apr 8, 2026
Merged

Add option to automatically update requirements.txt file#71
simion merged 2 commits intosimion:masterfrom
danifr:update_requirements

Conversation

@danifr
Copy link
Copy Markdown
Contributor

@danifr danifr commented Mar 31, 2026

No description provided.

@simion
Copy link
Copy Markdown
Owner

simion commented Apr 1, 2026

AI review - Claude

🟡 Suggestion (3)

  • Silent override of explicit -p when combined with --update-requirementspip_upgrader/cli.py (line 76)
    If a user passes both --update-requirements and -p django, their explicit package selection is silently replaced with ['all']. This is surprising behavior — the user likely expects either an error or for both flags to coexist sensibly.
  • Flag name is misleading — the tool always updates requirementspip_upgrader/cli.py (line 5)
    The name --update-requirements implies the tool doesn't normally update requirements files, but it always does. The flag actually means 'select all packages without prompting.' A name like --all or --non-interactive would better communicate its behavior. Additionally, this is functionally identical to the existing -p all, so consider whether a new flag is warranted at all.
  • No test coverage for the new flagpip_upgrader/cli.py (line 75)
    The new --update-requirements flag has no tests. At minimum, a test should verify that passing this flag results in all upgradable packages being selected (equivalent to -p all).

Bottom line: The implementation is correct but the flag name is misleading (the tool always updates requirements — this flag just skips the prompt), it silently overrides -p, and it ships without tests. Consider renaming to --all or --non-interactive, handling the -p conflict explicitly, and adding test coverage.

Automated review by reviewd in 54s. Findings are AI-generated and may not be accurate.
Replies to this comment are not monitored.

@danifr danifr force-pushed the update_requirements branch from 2d448e5 to f1f8ef4 Compare April 8, 2026 13:26
@danifr
Copy link
Copy Markdown
Contributor Author

danifr commented Apr 8, 2026

I think I addressed all the comments
Let me know if you want me to squash the commits in one and if you want a particular commit message. Thanks!

@simion simion merged commit cb40d6c into simion:master Apr 8, 2026
6 checks passed
@simion
Copy link
Copy Markdown
Owner

simion commented Apr 8, 2026

awesome, thanks for the contruibution! merged, releasing now.

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.

2 participants