-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Add pip_freeze to Check.py
#43591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add pip_freeze to Check.py
#43591
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the pip freeze debugging functionality by consolidating it into a reusable pip_freeze method in the Check base class. The method handles both uv and pip environments automatically, eliminating code duplication across multiple check implementations.
Key changes:
- Added a centralized
pip_freezemethod toCheck.pythat detects and handles bothuvandpippackage managers - Replaced duplicated pip freeze implementations in
pylint.pyandbandit.pywith calls to the new method - Updated
pylint.pyto userun_venv_commandinstead ofcheck_callfor better error handling
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| eng/tools/azure-sdk-tools/azpysdk/Check.py | Added new pip_freeze method to base class that handles both uv and pip environments |
| eng/tools/azure-sdk-tools/azpysdk/pylint.py | Replaced inline pip freeze code with call to new pip_freeze method; refactored pylint execution for better error handling |
| eng/tools/azure-sdk-tools/azpysdk/bandit.py | Replaced inline pip freeze code with call to new pip_freeze method |
| eng/tools/azure-sdk-tools/azpysdk/import_all.py | Removed outdated comment about pip freeze command |
…ssfully in azure devops
… setting up each of our isolated venvs
…he new package if we find it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.
Usable without needing to stumble over selection of
uvorpipgiven the context. It figures all that out for the user.todo:
azpysdkchecks inazure-sdk-toolscorestorage