You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/11 16:12:17 UTC
[GitHub] [spark] zero323 commented on pull request #32110: [SPARK-34630][PYTHON] Add typehint for pyspark.__version__
zero323 commented on pull request #32110:
URL: https://github.com/apache/spark/pull/32110#issuecomment-817331896
I think it will require some changes. First of all `__version__` is defined in `python.version`
https://github.com/apache/spark/blob/0e761c7307e780bd1d6cfe40e3d17ad003768411/python/pyspark/version.pyi#L19
so we shouldn't really annotate it directly in `pyspark.__init__`.
It is imported there, but not placed in `__all__`, so it formally not considered as exported.
We could cheat a bit and simply have
```python
from pyspark.version import __version__ as __version__
```
but to be consistent, we should also add `__version__` to `__all__` and drop `noqa: F401` from
https://github.com/apache/spark/blob/512f6258071666c3da07f6e6c6299d653a1cc370/python/pyspark/__init__.py#L63
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org