File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed
python-checks/src/main/resources/org/sonar/l10n/py/rules/python Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 1717 "quickfix" : " unknown" ,
1818 "code" : {
1919 "impacts" : {
20- "MAINTAINABILITY" : " MEDIUM" ,
21- "RELIABILITY" : " MEDIUM" ,
22- "SECURITY" : " LOW"
20+ "MAINTAINABILITY" : " MEDIUM"
2321 },
2422 "attribute" : " CONVENTIONAL"
2523 }
Original file line number Diff line number Diff line change 1- < p > This rule raises an issue when an attributes ending with < code > _</ code > is set in the < code > __init__</ code > method of a class inheriting from
1+ < p > This rule raises an issue when an attribute ending with < code > _</ code > is set in the < code > __init__</ code > method of a class inheriting from
22Scikit-Learn < code > BaseEstimator</ code > </ p >
33< h2 > Why is this an issue?</ h2 >
4- < p > On a Scikit-Learn estimator, attributes that have a trailing underscore represents attributes that are estimated. These attributes have to be set
5- in the fit method. Their presence are used to verify if an estimator has been fitted.</ p >
4+ < p > On a Scikit-Learn estimator, attributes that have a trailing underscore represent attributes that are estimated. These attributes have to be set in
5+ the fit method. Their presence is used to verify if an estimator has been fitted.</ p >
66< pre >
77from sklearn.neighbors import KNeighborsClassifier
88
@@ -41,6 +41,5 @@ <h3>Documentation</h3>
4141< ul >
4242 < li > Scikit-Learn documentation - < a href ="https://scikit-learn.org/stable/developers/develop.html#parameters-and-init "> Parameters and init</ a >
4343 </ li >
44- < li > {rule:python:S6970} - The Scikit-learn < code > fit</ code > method should be called before methods yielding results </ li >
4544</ ul >
4645
Original file line number Diff line number Diff line change 33 "languages" : [
44 " PY"
55 ],
6- "latest-update" : " 2024-05-08T13:59:27.675264513Z " ,
6+ "latest-update" : " 2024-06-06T09:09:16.726328Z " ,
77 "options" : {
88 "no-language-in-filenames" : true ,
99 "preserve-filenames" : true
You can’t perform that action at this time.
0 commit comments