Skip to content

Commit 58fb7b1

Browse files
[usless-parent-delegation] Set confidence to inference instead of undefined
1 parent 187400e commit 58fb7b1

File tree

5 files changed

+32
-29
lines changed

5 files changed

+32
-29
lines changed

pylint/checkers/classes/class_checker.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def _signature_from_call(call):
7373
for keyword in call.keywords or []:
7474
arg, value = keyword.arg, keyword.value
7575
if arg is None and isinstance(value, nodes.Name):
76-
# Starred node and we are interested only in names,
76+
# Starred node, and we are interested only in names,
7777
# otherwise some transformation might occur for the parameter.
7878
starred_kws.append(value.name)
7979
elif isinstance(value, nodes.Name):
@@ -1304,7 +1304,10 @@ def form_annotations(arguments):
13041304

13051305
if _definition_equivalent_to_call(params, args):
13061306
self.add_message(
1307-
"useless-super-delegation", node=function, args=(function.name,)
1307+
"useless-parent-delegation",
1308+
node=function,
1309+
args=(function.name,),
1310+
confidence=INFERENCE,
13081311
)
13091312

13101313
def _check_property_with_parameters(self, node):
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
useless-parent-delegation:214:4:214:25:UselessSuper.equivalent_params:Useless parent delegation in method 'equivalent_params':UNDEFINED
2-
useless-parent-delegation:217:4:217:27:UselessSuper.equivalent_params_1:Useless parent delegation in method 'equivalent_params_1':UNDEFINED
3-
useless-parent-delegation:220:4:220:27:UselessSuper.equivalent_params_2:Useless parent delegation in method 'equivalent_params_2':UNDEFINED
4-
useless-parent-delegation:223:4:223:27:UselessSuper.equivalent_params_3:Useless parent delegation in method 'equivalent_params_3':UNDEFINED
5-
useless-parent-delegation:226:4:226:27:UselessSuper.equivalent_params_4:Useless parent delegation in method 'equivalent_params_4':UNDEFINED
6-
useless-parent-delegation:229:4:229:27:UselessSuper.equivalent_params_5:Useless parent delegation in method 'equivalent_params_5':UNDEFINED
7-
useless-parent-delegation:232:4:232:27:UselessSuper.equivalent_params_6:Useless parent delegation in method 'equivalent_params_6':UNDEFINED
8-
useless-parent-delegation:235:4:235:29:UselessSuper.with_default_argument:Useless parent delegation in method 'with_default_argument':UNDEFINED
9-
useless-parent-delegation:239:4:239:32:UselessSuper.without_default_argument:Useless parent delegation in method 'without_default_argument':UNDEFINED
10-
useless-parent-delegation:242:4:242:34:UselessSuper.with_default_argument_none:Useless parent delegation in method 'with_default_argument_none':UNDEFINED
11-
useless-parent-delegation:246:4:246:33:UselessSuper.with_default_argument_int:Useless parent delegation in method 'with_default_argument_int':UNDEFINED
12-
useless-parent-delegation:249:4:249:35:UselessSuper.with_default_argument_tuple:Useless parent delegation in method 'with_default_argument_tuple':UNDEFINED
13-
useless-parent-delegation:252:4:252:34:UselessSuper.with_default_argument_dict:Useless parent delegation in method 'with_default_argument_dict':UNDEFINED
14-
useless-parent-delegation:255:4:255:33:UselessSuper.with_default_argument_var:Useless parent delegation in method 'with_default_argument_var':UNDEFINED
15-
useless-parent-delegation:258:4:258:16:UselessSuper.__init__:Useless parent delegation in method '__init__':UNDEFINED
16-
useless-parent-delegation:261:4:261:24:UselessSuper.with_default_arg:Useless parent delegation in method 'with_default_arg':UNDEFINED
17-
useless-parent-delegation:264:4:264:28:UselessSuper.with_default_arg_bis:Useless parent delegation in method 'with_default_arg_bis':UNDEFINED
18-
useless-parent-delegation:267:4:267:28:UselessSuper.with_default_arg_ter:Useless parent delegation in method 'with_default_arg_ter':UNDEFINED
19-
useless-parent-delegation:270:4:270:29:UselessSuper.with_default_arg_quad:Useless parent delegation in method 'with_default_arg_quad':UNDEFINED
20-
useless-parent-delegation:304:4:304:16:DecoratedList.__hash__:Useless parent delegation in method '__hash__':UNDEFINED
21-
useless-parent-delegation:330:4:330:16:SubTwoOne.__init__:Useless parent delegation in method '__init__':UNDEFINED
1+
useless-parent-delegation:214:4:214:25:UselessSuper.equivalent_params:Useless parent delegation in method 'equivalent_params':INFERENCE
2+
useless-parent-delegation:217:4:217:27:UselessSuper.equivalent_params_1:Useless parent delegation in method 'equivalent_params_1':INFERENCE
3+
useless-parent-delegation:220:4:220:27:UselessSuper.equivalent_params_2:Useless parent delegation in method 'equivalent_params_2':INFERENCE
4+
useless-parent-delegation:223:4:223:27:UselessSuper.equivalent_params_3:Useless parent delegation in method 'equivalent_params_3':INFERENCE
5+
useless-parent-delegation:226:4:226:27:UselessSuper.equivalent_params_4:Useless parent delegation in method 'equivalent_params_4':INFERENCE
6+
useless-parent-delegation:229:4:229:27:UselessSuper.equivalent_params_5:Useless parent delegation in method 'equivalent_params_5':INFERENCE
7+
useless-parent-delegation:232:4:232:27:UselessSuper.equivalent_params_6:Useless parent delegation in method 'equivalent_params_6':INFERENCE
8+
useless-parent-delegation:235:4:235:29:UselessSuper.with_default_argument:Useless parent delegation in method 'with_default_argument':INFERENCE
9+
useless-parent-delegation:239:4:239:32:UselessSuper.without_default_argument:Useless parent delegation in method 'without_default_argument':INFERENCE
10+
useless-parent-delegation:242:4:242:34:UselessSuper.with_default_argument_none:Useless parent delegation in method 'with_default_argument_none':INFERENCE
11+
useless-parent-delegation:246:4:246:33:UselessSuper.with_default_argument_int:Useless parent delegation in method 'with_default_argument_int':INFERENCE
12+
useless-parent-delegation:249:4:249:35:UselessSuper.with_default_argument_tuple:Useless parent delegation in method 'with_default_argument_tuple':INFERENCE
13+
useless-parent-delegation:252:4:252:34:UselessSuper.with_default_argument_dict:Useless parent delegation in method 'with_default_argument_dict':INFERENCE
14+
useless-parent-delegation:255:4:255:33:UselessSuper.with_default_argument_var:Useless parent delegation in method 'with_default_argument_var':INFERENCE
15+
useless-parent-delegation:258:4:258:16:UselessSuper.__init__:Useless parent delegation in method '__init__':INFERENCE
16+
useless-parent-delegation:261:4:261:24:UselessSuper.with_default_arg:Useless parent delegation in method 'with_default_arg':INFERENCE
17+
useless-parent-delegation:264:4:264:28:UselessSuper.with_default_arg_bis:Useless parent delegation in method 'with_default_arg_bis':INFERENCE
18+
useless-parent-delegation:267:4:267:28:UselessSuper.with_default_arg_ter:Useless parent delegation in method 'with_default_arg_ter':INFERENCE
19+
useless-parent-delegation:270:4:270:29:UselessSuper.with_default_arg_quad:Useless parent delegation in method 'with_default_arg_quad':INFERENCE
20+
useless-parent-delegation:304:4:304:16:DecoratedList.__hash__:Useless parent delegation in method '__hash__':INFERENCE
21+
useless-parent-delegation:330:4:330:16:SubTwoOne.__init__:Useless parent delegation in method '__init__':INFERENCE
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
useless-parent-delegation:21:4:21:15:UselessSuper.useless:Useless parent delegation in method 'useless':UNDEFINED
2-
useless-parent-delegation:34:4:34:16:Ham.__init__:Useless parent delegation in method '__init__':UNDEFINED
1+
useless-parent-delegation:21:4:21:15:UselessSuper.useless:Useless parent delegation in method 'useless':INFERENCE
2+
useless-parent-delegation:34:4:34:16:Ham.__init__:Useless parent delegation in method '__init__':INFERENCE
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
useless-parent-delegation:11:4:11:15:UselessSuper.useless:Useless parent delegation in method 'useless':UNDEFINED
2-
useless-parent-delegation:39:4:39:12:ReturnTypeSpecified.draw:Useless parent delegation in method 'draw':UNDEFINED
3-
useless-parent-delegation:45:4:45:12:ReturnTypeSame.draw:Useless parent delegation in method 'draw':UNDEFINED
1+
useless-parent-delegation:11:4:11:15:UselessSuper.useless:Useless parent delegation in method 'useless':INFERENCE
2+
useless-parent-delegation:39:4:39:12:ReturnTypeSpecified.draw:Useless parent delegation in method 'draw':INFERENCE
3+
useless-parent-delegation:45:4:45:12:ReturnTypeSame.draw:Useless parent delegation in method 'draw':INFERENCE
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
useless-parent-delegation:16:4:16:16:Ham.__init__:Useless parent delegation in method '__init__':UNDEFINED
1+
useless-parent-delegation:16:4:16:16:Ham.__init__:Useless parent delegation in method '__init__':INFERENCE

0 commit comments

Comments
 (0)