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



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

Reply via email to