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 17
17
"quickfix" : " unknown" ,
18
18
"code" : {
19
19
"impacts" : {
20
- "MAINTAINABILITY" : " MEDIUM" ,
21
- "RELIABILITY" : " MEDIUM" ,
22
- "SECURITY" : " LOW"
20
+ "MAINTAINABILITY" : " MEDIUM"
23
21
},
24
22
"attribute" : " CONVENTIONAL"
25
23
}
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
2
2
Scikit-Learn < code > BaseEstimator</ code > </ p >
3
3
< 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 >
6
6
< pre >
7
7
from sklearn.neighbors import KNeighborsClassifier
8
8
@@ -41,6 +41,5 @@ <h3>Documentation</h3>
41
41
< ul >
42
42
< li > Scikit-Learn documentation - < a href ="https://scikit-learn.org/stable/developers/develop.html#parameters-and-init "> Parameters and init</ a >
43
43
</ li >
44
- < li > {rule:python:S6970} - The Scikit-learn < code > fit</ code > method should be called before methods yielding results </ li >
45
44
</ ul >
46
45
Original file line number Diff line number Diff line change 3
3
"languages" : [
4
4
" PY"
5
5
],
6
- "latest-update" : " 2024-05-08T13:59:27.675264513Z " ,
6
+ "latest-update" : " 2024-06-06T09:09:16.726328Z " ,
7
7
"options" : {
8
8
"no-language-in-filenames" : true ,
9
9
"preserve-filenames" : true
You can’t perform that action at this time.
0 commit comments