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

Reply via email to