You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR improves the --fix mode in both util/lint.py and util/lint.ps1 to run only fixable checks (Black + isort) when used alone, making it faster and more focused.
Review Feedback
🟢 Good
Clean implementation - The fix-only mode detection is straightforward:
lint.py:548: fix_only = args.fix and not specific_checks
Consistent behavior - Both Python and PowerShell scripts now behave identically
Helpful user feedback - Shows which files were actually fixed and provides clear next steps
Progress indicators updated - Shows [1/2] and [2/2] in fix mode vs [1/7], [2/7] in full mode
🟡 Suggestions (Minor)
lint.py:76 - The import re inside the function could be moved to the module level for consistency (though it's fine as-is for lazy loading)
lint.py:505-514 - The print_fix_summary() function could include counts of files fixed (already tracked in the results):
defprint_fix_summary(results: list[CheckResult]) ->None:
# Could iterate results to show actual fix counts
lint.ps1:62-64 - The $cmd variable is constructed but only used for display. This is fine but could be extracted to a helper for DRY if more commands are added later.
🟢 Edge Cases Handled
--fix --all runs all checks with fixing enabled ✓
--fix --black runs only black with fixing enabled ✓
--fix alone runs only Black + isort ✓
Verdict
Looks good to merge! The changes are well-implemented and achieve the stated goal of making --fix faster when used standalone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Updates
util/lint.pyandutil/lint.ps1so that--fix(or-Fix) runs only the fixable checks (Black + isort) instead of all 7 checks.Improvements:
--fixalone now only runs Black and isort (faster)Usage