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



##########
File path: python/pyspark/conf.py
##########
@@ -118,13 +126,13 @@ def __init__(self, loadDefaults=True, _jvm=None, 
_jconf=None):
             if _jvm is not None:
                 # JVM is created, so create self._jconf directly through JVM
                 self._jconf = _jvm.SparkConf(loadDefaults)
-                self._conf = None
+                self._conf: Dict[str, str] = None  # type: ignore[assignment]

Review comment:
       > Should we add check `_conf is not None` in case
   
   In general access to `_conf` is conditioned on `_jconf` not being present, 
and if it is not, `_conf` is set within initializer. So I'd say no.
   
   Also, if it was something to change, it would be out of scope here. Type 
hint migration touches a lot of code, but by itself  should be safe. Adding 
anything to it, unless strictly necessary, not so much :)




-- 
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