StardustDL commented on PR #42125:
URL: https://github.com/apache/spark/pull/42125#issuecomment-1784496396
> the python linter fails with
>
> ```
> Python compilation failed with the following errors:
> *** Error compiling 'dev/aexpy/aexpy/diffing/evaluators/typing.py'...
> File "dev/aexpy/aexpy/diffing/evaluators/typing.py", line 59
> match b:
> ^
> SyntaxError: invalid syntax
>
> *** Error compiling
'dev/aexpy/aexpy/extracting/enriching/callgraph/basic.py'...
> File "dev/aexpy/aexpy/extracting/enriching/callgraph/basic.py", line 43
> match node.func:
> ^
> SyntaxError: invalid syntax
> ```
>
> probably need a `mypy.ini` file to disable mypy checking
@zhengruifeng This error probably occurs in `lint-python` script, when it
compiles all python files by Python 3.9 (defined in env var, specified in
workflow files), which is not compatible with the code of aexpy (requires 3.10).
```bash
function compile_python_test {
# compileall: https://docs.python.org/3/library/compileall.html
echo "starting python compilation test..."
COMPILE_REPORT=$( ("$PYTHON_EXECUTABLE" -B -mcompileall -q -l -x
"[/\\\\][.]git" $1) 2>&1)
COMPILE_STATUS=$?
if [ $COMPILE_STATUS -ne 0 ]; then
echo "Python compilation failed with the following errors:"
```
could updating the option `-x "[/\\\\][.]git|aexpy"` in the compile command
fix this?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]