Skip to content

Commit 2a53891

Browse files
committed
fix functional test txt
1 parent 3c06dc9 commit 2a53891

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

pylint/checkers/typecheck.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,7 @@ def _check_isinstance_args(self, node: nodes.Call) -> None:
14261426
"too-many-arguments",
14271427
node=node,
14281428
args=(len(node.args), 2),
1429+
confidence=HIGH,
14291430
)
14301431
elif len(node.args) < 2:
14311432
# not currently handling the too few args case

tests/functional/t/too/too_many_arguments.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ def name1(param1, param2, param3, /, param4, param5, *args, param6="apple", **kw
3939

4040

4141
# Negative case, see `_check_isinstance_args` in `./pylint/checkers/typecheck.py`
42-
isinstance(5, int, int) # [too-many-arguments]
42+
isinstance(1, int, int) # [too-many-arguments]
43+
isinstance(1, 1, int) # [too-many-arguments, isinstance-second-argument-not-valid-type]
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
too-many-arguments:5:0:5:19:stupid_function:Too many arguments (9/5):UNDEFINED
2-
too-many-positional-arguments:5:0:5:19:stupid_function:Too many positional arguments (9/5):HIGH
3-
too-many-arguments:35:0:35:9:name1:Too many arguments (6/5):UNDEFINED
4-
too-many-arguments:40:0:40:23::Too many arguments (3/2):UNDEFINED
1+
too-many-arguments:4:0:4:19:stupid_function:Too many arguments (9/5):UNDEFINED
2+
too-many-positional-arguments:4:0:4:19:stupid_function:Too many positional arguments (9/5):HIGH
3+
too-many-arguments:37:0:37:9:name1:Too many arguments (6/5):UNDEFINED
4+
too-many-arguments:42:0:42:23::Too many arguments (3/2):HIGH
5+
isinstance-second-argument-not-valid-type:43:0:43:21::Second argument of isinstance is not a type:INFERENCE
6+
too-many-arguments:43:0:43:21::Too many arguments (3/2):HIGH

0 commit comments

Comments
 (0)