zero323 commented on a change in pull request #34466:
URL: https://github.com/apache/spark/pull/34466#discussion_r753819607
##########
File path: python/pyspark/context.py
##########
@@ -125,30 +144,36 @@ class SparkContext(object):
ValueError: ...
"""
- _gateway = None
- _jvm = None
+ _gateway: JavaGateway = None
+ _jvm: JVMView = None
_next_accum_id = 0
- _active_spark_context = None
+ _active_spark_context: Optional["SparkContext"] = None
_lock = RLock()
- _python_includes = None # zip and egg files that need to be added to
PYTHONPATH
-
+ _python_includes: Optional[
+ List[str]
+ ] = None # zip and egg files that need to be added to PYTHONPATH
+ profiler_collector: Optional[ProfilerCollector]
+ serializer: Serializer
Review comment:
These should be marked as `ClassVar`.
--
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]