zero323 commented on a change in pull request #32125:
URL: https://github.com/apache/spark/pull/32125#discussion_r611423359



##########
File path: python/pyspark/__init__.py
##########
@@ -60,7 +60,7 @@
 from pyspark.serializers import MarshalSerializer, PickleSerializer
 from pyspark.taskcontext import TaskContext, BarrierTaskContext, 
BarrierTaskInfo
 from pyspark.profiler import Profiler, BasicProfiler
-from pyspark.version import __version__  # noqa: F401
+from pyspark.version import __version__ as __version__

Review comment:
       Technically speaking, we just need 
   
   ```python
   from pyspark.version import __version__
   ```
   
   here.
   
   Following
   
   ```python
   from pyspark.version import __version__ as __version__
   ```
   
   should be placed in `__init__.pyi` to mark [explicit 
re-export](https://mypy.readthedocs.io/en/stable/command_line.html?highlight=export#cmdoption-mypy-no-implicit-reexport).
   
   We should also drop 
https://github.com/apache/spark/blob/c3f4763282567a2af4a2ed88726af27e7fd3c439/python/pyspark/__init__.pyi#L75




-- 
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to