diff --git a/rules/S6970/python/rule.adoc b/rules/S6970/python/rule.adoc index a57a2dea6a..c0163a8720 100644 --- a/rules/S6970/python/rule.adoc +++ b/rules/S6970/python/rule.adoc @@ -82,9 +82,31 @@ ifdef::env-github,rspecator-view[] Implementation details: -Only if the list of methods above are called, we should check for the `fit` or `partial_fit` methods called on the same object. -Issue location: the name of the method or attribute (from the list above) -Message: Call the fit method on this estimator before retrieving the results. +* predict + +* predict_proba + +* predict_log_proba + +* score + +* score_samples + +* decision_function + +* transform + +* inverse_transform + +If the list of methods above are called, we should check for the `fit` or `partial_fit` methods called on the same object. +Or if an argument of an estimator is called and the name of the argument ends with an underscore we should check for the fit or partial_fit methods call. + +An estimator can be detected if the object inherits from `BaseEstimator`. + +Issue location: the name of the method or attribute (from the list above) + +Message: Call the fit method on this estimator before retrieving the results. + Quickfix: Not applicable (could be too tricky as the parameters of fit and predict could be different) endif::env-github,rspecator-view[]