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 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
The reason will be displayed to describe this comment to others. Learn more.
Running ruff-lint and ruff-format in parallel can cause race conditions since both commands may try to modify the same files simultaneously. The format command should run after lint completes to ensure consistent results. Consider setting parallel: false or using the piped: true option to run commands sequentially, or move ruff-format to a separate sequential group.
The reason will be displayed to describe this comment to others. Learn more.
Running mypy on individual staged files may miss type errors related to imports and cross-module dependencies. The CI workflow runs mypy . to type-check the entire codebase. Consider changing this to run mypy . instead of mypy {staged_files} to maintain consistency with CI and catch all type errors. Alternatively, if you want to keep it file-specific for performance, you may want to add a flag like --follow-imports=silent to avoid false positives.
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
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
The reason will be displayed to describe this comment to others. Learn more.
The logic is inverted. The condition checks if the command does NOT exist (! command -v lefthook), but then attempts to run lefthook install. This will fail because lefthook won't be available. The installation should happen after pip installs the requirements (which includes lefthook), so the condition should check if lefthook DOES exist. Change the condition to if command -v lefthook &>/dev/null; then or remove the negation operator.
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.
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.
Running ruff-lint and ruff-format in parallel can cause race conditions since both commands may try to modify the same files simultaneously. The format command should run after lint completes to ensure consistent results. Consider setting
parallel: falseor using thepiped: trueoption to run commands sequentially, or move ruff-format to a separate sequential group.