zero323 commented on a change in pull request #35124:
URL: https://github.com/apache/spark/pull/35124#discussion_r800174682
##########
File path: python/pyspark/ml/classification.py
##########
@@ -134,7 +137,7 @@ class Classifier(Predictor, _ClassifierParams,
metaclass=ABCMeta):
"""
@since("3.0.0")
- def setRawPredictionCol(self, value):
+ def setRawPredictionCol(self, value: str) -> "P":
Review comment:
All the setter methods in classes intended for inheritance should have
bounds on `self` to ensure that specific type is resolved on return, i.e.
```python
def setRawPredictionCol(self: "P", value: str) -> "P":
```
--
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]