JingsongLi commented on code in PR #7844:
URL: https://github.com/apache/paimon/pull/7844#discussion_r3246504320


##########
paimon-python/dev/lint-python.sh:
##########
@@ -134,25 +134,14 @@ function check_stage() {
 # This part defines all check functions such as tox_check and flake8_check
 # We make a rule that all check functions are suffixed with _ check. e.g. 
tox_check, flake8_check
 #########################
-# License header check
-function license_check() {
-    print_function "STAGE" "license header checks"
-
-    set -o pipefail
-    (python "$CURRENT_DIR/dev/check_license_header.py") 2>&1 | tee -a $LOG_FILE
-
-    LICENSE_STATUS=$?
-    if [ $LICENSE_STATUS -ne 0 ]; then
-        print_function "STAGE" "license header checks... [FAILED]"
-        exit 1
-    else
-        print_function "STAGE" "license header checks... [SUCCESS]"
-    fi
-}
-
 # Flake8 check
 function flake8_check() {
-    local PYTHON_SOURCE="$(find . \( -path ./dev -o -path ./.tox -o -path 
./.venv \) -prune -o -type f -name "*.py" -print )"
+    local PRUNE_PATHS="\( -path ./dev -o -path ./.tox -o -path ./.venv"
+    if python -c "import sys; sys.exit(0 if sys.version_info < (3, 7) else 1)" 
2>/dev/null; then

Review Comment:
   The meaning of this code is to exclude the daft directory only when the 
Python version is below 3.7. But daft>=0.7.6 requires Python>=3.10 (defined in 
setup. py), so the judgment condition should be sys. version info<(3, 10). 
Moreover, it is unlikely that Python below 3.7 is currently in use.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to