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
The **/__pycache__/ entry in CLEAN_DIRS may not work as intended because Make does not enable globstar by default. However, the subsequent find commands for __pycache__ and .pyc files provide complete coverage, making this entry redundant.
The Python version check hardcodes version 3.10 instead of using the MIN_PYTHON_VERSION variable. Use tuple comparison with the variable for better maintainability.
-@$(PYTHON) -c "import sys; v=sys.version_info; exit(0 if v.major > 3 or (v.major == 3 and v.minor >= 10) else 1)" || (echo "Error: Python >= $(MIN_PYTHON_VERSION) is required."; exit 1)+@$(PYTHON) -c "import sys; req = tuple(map(int, sys.argv[1].split('.'))); v = sys.version_info; exit(0 if (v.major, v.minor) >= req else 1)" "$(MIN_PYTHON_VERSION)" || (echo "Error: Python >= $(MIN_PYTHON_VERSION) is required."; exit 1)
Suggestion importance[1-10]: 5
__
Why: The Python version check currently hardcodes version 3.10 instead of using the MIN_PYTHON_VERSION variable, which harms maintainability. The improved code uses the variable for consistency.
Low
Remove redundant __pycache__ entry
The /pycache/ entry in CLEAN_DIRS is redundant because the clean target already uses find to remove pycache directories, and the glob may not expand correctly in the shell loop.**
Why: The **/__pycache__/ entry in CLEAN_DIRS is redundant because the clean target already uses find to remove pycache directories, and the glob may not expand correctly in the shell loop.
Low
Quote path in rm command
Quote the directory variable in rm -rf to handle paths with spaces correctly, even if spaces are not expected in this project.
Why: Quoting the $$dir variable in the rm -rf command improves robustness by handling paths with spaces correctly, even if spaces are not expected in this project.
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.
chore: 增加Makefile,方便build
Type of Change
Testing
Related Issues
Checklist