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/12/07 01:00:05 UTC

[GitHub] [spark] ueshin commented on a change in pull request #34466: [SPARK-37152][PYTHON] Inline type hints for python/pyspark/context.py

ueshin commented on a change in pull request #34466:
URL: https://github.com/apache/spark/pull/34466#discussion_r763544213



##########
File path: python/pyspark/context.py
##########
@@ -128,31 +152,40 @@ class SparkContext(object):
     ValueError: ...
     """
 
-    _gateway = None
-    _jvm = None
+    # set assignment ignore temporarily to prevent errors from other files
+    _gateway: ClassVar[JavaGateway] = None  # type: ignore[assignment]
+    _jvm: ClassVar[JVMView] = None  # type: ignore[assignment]
     _next_accum_id = 0
-    _active_spark_context = None
+    _active_spark_context: ClassVar["SparkContext"] = None  # type: ignore[assignment]

Review comment:
       Yeah, let's keep it as is for now and do the refinements in a separate PR.




-- 
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: reviews-unsubscribe@spark.apache.org

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