zhengruifeng commented on PR #38253:
URL: https://github.com/apache/spark/pull/38253#issuecomment-1280125891

   installing `mypy-protobuf` doesn't change the versions of 
`mypy`,`mypy-extensions`,`pytest-mypy-plugins`, but it changes the behaviors:
   
   ```
   (spark_test) ➜  spark git:(master) ✗ pip list | grep -i mypy
   mypy                          0.920
   mypy-extensions               0.4.3
   pytest-mypy-plugins           1.9.3
   (spark_test) ➜  spark git:(master) ✗ ./dev/lint-python
   starting python compilation test...
   python compilation succeeded.
   
   starting black test...
   black checks passed.
   
   starting flake8 test...
   flake8 checks passed.
   
   starting mypy annotations test...
   annotations failed mypy checks:
   python/pyspark/pandas/frame.py:6371: error: unused "type: ignore" comment
   python/pyspark/pandas/frame.py:6428: error: unused "type: ignore" comment
   python/pyspark/pandas/frame.py:6430: error: unused "type: ignore" comment
   python/pyspark/pandas/resample.py:104: error: unused "type: ignore" comment
   python/pyspark/pandas/resample.py:137: error: unused "type: ignore" comment
   Found 5 errors in 2 files (checked 366 source files)
   1
   
   
   
   (spark_test) ➜  spark git:(master) ✗ pip install mypy-protobuf
   Collecting mypy-protobuf
     Using cached mypy_protobuf-3.3.0-py3-none-any.whl (16 kB)
   Collecting types-protobuf>=3.19.12
     Using cached types_protobuf-3.20.4-py3-none-any.whl (60 kB)
   Requirement already satisfied: protobuf>=3.19.4 in 
/Users/ruifeng.zheng/.dev/miniconda3/envs/spark_test/lib/python3.10/site-packages
 (from mypy-protobuf) (4.21.6)
   Installing collected packages: types-protobuf, mypy-protobuf
   Successfully installed mypy-protobuf-3.3.0 types-protobuf-3.20.4
   (spark_test) ➜  spark git:(master) ✗ ./dev/lint-python
   starting python compilation test...
   python compilation succeeded.
   
   starting black test...
   black checks passed.
   
   starting flake8 test...
   flake8 checks passed.
   
   starting mypy annotations test...
   annotations failed mypy checks:
   python/pyspark/pandas/frame.py:6371: error: unused "type: ignore" comment
   python/pyspark/pandas/frame.py:6428: error: unused "type: ignore" comment
   python/pyspark/pandas/frame.py:6430: error: unused "type: ignore" comment
   python/pyspark/pandas/resample.py:104: error: unused "type: ignore" comment
   python/pyspark/pandas/resample.py:137: error: unused "type: ignore" comment
   python/pyspark/sql/connect/plan.py:325: error: "AggregateFunction" has no 
attribute "function"  [attr-defined]
   python/pyspark/sql/connect/plan.py:327: error: "AggregateFunction" has no 
attribute "function"  [attr-defined]
   python/pyspark/sql/connect/plan.py:329: error: "AggregateFunction" has no 
attribute "function"  [attr-defined]
   python/pyspark/sql/connect/plan.py:338: error: "Aggregate" has no attribute 
"measures"  [attr-defined]
   python/pyspark/sql/connect/plan.py:342: error: "Type[Aggregate]" has no 
attribute "GroupingSet"  [attr-defined]
   python/pyspark/sql/connect/plan.py:344: error: "Aggregate" has no attribute 
"grouping_sets"  [attr-defined]
   python/pyspark/sql/connect/plan.py:385: error: "Join" has no attribute "on"  
[attr-defined]
   Found 12 errors in 3 files (checked 366 source files)
   1
   (spark_test) ➜  spark git:(master) pip list | grep -i mypy
   mypy                          0.920
   mypy-extensions               0.4.3
   mypy-protobuf                 3.3.0
   pytest-mypy-plugins           1.9.3
   ```


-- 
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]

Reply via email to