zero323 commented on pull request #30009: URL: https://github.com/apache/spark/pull/30009#issuecomment-706917827
> @zero323 I send a new PR here, thanks for reviewing. I tried to verify consistency of annotations locally, but the following cmd failed: > > ``` > mypy --no-incremental --config python/mypy.ini python/pyspark > python/pyspark/ml/linalg/__init__.pyi:25: error: misplaced type annotation > ``` > > I installed `mypy` by `sudo apt install mypy` in ubuntu 18.04, > I am not very similar to `mypy`, do I need to configure it somewhere? No additional configuration should be required, but the version from Ubuntu errors is pretty old, and at first glance it doesn't support error codes (`[import]` part). Personally I'd recommend either [venv](https://docs.python.org/3/library/venv.html) or miniconda, but if you want quick fix, installing pip and making user install should do the trick ``` sudo apt purge mypy sudo apt install python3-pip pip install mypy ``` I've checked things on my side (mypy 0.790, current stable), for both master and this PR, and things look good. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org