zero323 commented on a change in pull request #34411:
URL: https://github.com/apache/spark/pull/34411#discussion_r739106537
##########
File path: python/pyspark/conf.py
##########
@@ -124,48 +130,57 @@ def __init__(self, loadDefaults=True, _jvm=None,
_jconf=None):
self._jconf = None
self._conf = {}
- def set(self, key, value):
+ def set(self, key: str, value: str) -> "SparkConf":
Review comment:
I guess we could be less restrictive here, but I am not sure if that's a
good idea, since it would depend on `__str__` or `__repr__` implementation for
the `value`. This has some weird consequences, like:
```python
>>> key, value = "foo", None
>>> conf = sc.getConf()
>>> conf.set(key, value)
<pyspark.conf.SparkConf object at 0x7f4870aa5ee0>
>>> conf.get(key) == value
False
```
--
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]