diff options
author | Dani Alcala <112832187+clavedeluna@users.noreply.github.com> | 2022-11-05 12:19:24 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 16:19:24 +0100 |
commit | 160345d35ccf025f7ec085d0806e6e9b9eb20172 (patch) | |
tree | edffa15510379519dfdebcbd3a22be775af75f15 /tests/functional | |
parent | 3c180dff050af44e7b4f9adf1ab872031fb9f6a8 (diff) | |
download | pylint-git-160345d35ccf025f7ec085d0806e6e9b9eb20172.tar.gz |
Add confidence levels to all exception checkers (#7716)
Diffstat (limited to 'tests/functional')
-rw-r--r-- | tests/functional/b/bad_except_order.txt | 10 | ||||
-rw-r--r-- | tests/functional/b/bare_except.txt | 2 | ||||
-rw-r--r-- | tests/functional/b/broad_exception_caught.txt | 4 | ||||
-rw-r--r-- | tests/functional/b/broad_exception_raised.txt | 2 | ||||
-rw-r--r-- | tests/functional/d/duplicate_except.txt | 2 | ||||
-rw-r--r-- | tests/functional/e/exception_is_binary_op.txt | 8 | ||||
-rw-r--r-- | tests/functional/ext/docparams/raise/missing_raises_doc.txt | 2 | ||||
-rw-r--r-- | tests/functional/i/invalid/invalid_exceptions/invalid_exceptions_raised.txt | 22 | ||||
-rw-r--r-- | tests/functional/m/misplaced_bare_raise.txt | 14 | ||||
-rw-r--r-- | tests/functional/r/raising/raising_bad_type.txt | 2 | ||||
-rw-r--r-- | tests/functional/r/raising/raising_format_tuple.txt | 14 | ||||
-rw-r--r-- | tests/functional/r/raising/raising_non_exception.txt | 2 |
12 files changed, 42 insertions, 42 deletions
diff --git a/tests/functional/b/bad_except_order.txt b/tests/functional/b/bad_except_order.txt index c6e6b4471..70443408f 100644 --- a/tests/functional/b/bad_except_order.txt +++ b/tests/functional/b/bad_except_order.txt @@ -1,5 +1,5 @@ -bad-except-order:9:7:9:16::Bad except clauses order (Exception is an ancestor class of TypeError):UNDEFINED -bad-except-order:16:7:16:17::Bad except clauses order (LookupError is an ancestor class of IndexError):UNDEFINED -bad-except-order:23:7:23:38::Bad except clauses order (LookupError is an ancestor class of IndexError):UNDEFINED -bad-except-order:23:7:23:38::Bad except clauses order (NameError is an ancestor class of UnboundLocalError):UNDEFINED -bad-except-order:26:0:31:8::Bad except clauses order (empty except clause should always appear last):UNDEFINED +bad-except-order:9:7:9:16::Bad except clauses order (Exception is an ancestor class of TypeError):INFERENCE +bad-except-order:16:7:16:17::Bad except clauses order (LookupError is an ancestor class of IndexError):INFERENCE +bad-except-order:23:7:23:38::Bad except clauses order (LookupError is an ancestor class of IndexError):INFERENCE +bad-except-order:23:7:23:38::Bad except clauses order (NameError is an ancestor class of UnboundLocalError):INFERENCE +bad-except-order:26:0:31:8::Bad except clauses order (empty except clause should always appear last):HIGH diff --git a/tests/functional/b/bare_except.txt b/tests/functional/b/bare_except.txt index 584f1be6d..7957bc144 100644 --- a/tests/functional/b/bare_except.txt +++ b/tests/functional/b/bare_except.txt @@ -1 +1 @@ -bare-except:5:0:6:8::No exception type(s) specified:UNDEFINED +bare-except:5:0:6:8::No exception type(s) specified:HIGH diff --git a/tests/functional/b/broad_exception_caught.txt b/tests/functional/b/broad_exception_caught.txt index 387a60ccd..256f5986f 100644 --- a/tests/functional/b/broad_exception_caught.txt +++ b/tests/functional/b/broad_exception_caught.txt @@ -1,2 +1,2 @@ -broad-exception-caught:6:7:6:16::Catching too general exception Exception:UNDEFINED -broad-exception-caught:12:7:12:20::Catching too general exception BaseException:UNDEFINED +broad-exception-caught:6:7:6:16::Catching too general exception Exception:INFERENCE +broad-exception-caught:12:7:12:20::Catching too general exception BaseException:INFERENCE diff --git a/tests/functional/b/broad_exception_raised.txt b/tests/functional/b/broad_exception_raised.txt index 594dd5200..9482775c3 100644 --- a/tests/functional/b/broad_exception_raised.txt +++ b/tests/functional/b/broad_exception_raised.txt @@ -1,5 +1,5 @@ broad-exception-raised:5:4:5:41:exploding_apple:"Raising too general exception: Exception":HIGH broad-exception-raised:10:8:10:34:raise_and_catch:"Raising too general exception: Exception":HIGH -broad-exception-caught:11:11:11:20:raise_and_catch:Catching too general exception Exception:UNDEFINED +broad-exception-caught:11:11:11:20:raise_and_catch:Catching too general exception Exception:INFERENCE broad-exception-raised:14:0:14:17::"Raising too general exception: Exception":HIGH broad-exception-raised:15:0:15:21::"Raising too general exception: BaseException":HIGH diff --git a/tests/functional/d/duplicate_except.txt b/tests/functional/d/duplicate_except.txt index 8753f44b1..2bd56881a 100644 --- a/tests/functional/d/duplicate_except.txt +++ b/tests/functional/d/duplicate_except.txt @@ -1 +1 @@ -duplicate-except:9:11:9:21:main:Catching previously caught exception type ValueError:UNDEFINED +duplicate-except:9:11:9:21:main:Catching previously caught exception type ValueError:INFERENCE diff --git a/tests/functional/e/exception_is_binary_op.txt b/tests/functional/e/exception_is_binary_op.txt index 4871a71d2..de371e42e 100644 --- a/tests/functional/e/exception_is_binary_op.txt +++ b/tests/functional/e/exception_is_binary_op.txt @@ -1,4 +1,4 @@ -binary-op-exception:5:0:6:20::"Exception to catch is the result of a binary ""or"" operation":UNDEFINED -binary-op-exception:7:0:8:20::"Exception to catch is the result of a binary ""and"" operation":UNDEFINED -binary-op-exception:9:0:10:20::"Exception to catch is the result of a binary ""or"" operation":UNDEFINED -binary-op-exception:11:0:12:20::"Exception to catch is the result of a binary ""or"" operation":UNDEFINED +binary-op-exception:5:0:6:20::"Exception to catch is the result of a binary ""or"" operation":HIGH +binary-op-exception:7:0:8:20::"Exception to catch is the result of a binary ""and"" operation":HIGH +binary-op-exception:9:0:10:20::"Exception to catch is the result of a binary ""or"" operation":HIGH +binary-op-exception:11:0:12:20::"Exception to catch is the result of a binary ""or"" operation":HIGH diff --git a/tests/functional/ext/docparams/raise/missing_raises_doc.txt b/tests/functional/ext/docparams/raise/missing_raises_doc.txt index 38b0437fc..d770776ef 100644 --- a/tests/functional/ext/docparams/raise/missing_raises_doc.txt +++ b/tests/functional/ext/docparams/raise/missing_raises_doc.txt @@ -1,4 +1,4 @@ unreachable:25:4:25:25:test_ignores_raise_uninferable:Unreachable code:HIGH missing-raises-doc:28:0:28:45:test_ignores_returns_from_inner_functions:"""RuntimeError"" not documented as being raised":HIGH unreachable:42:4:42:25:test_ignores_returns_from_inner_functions:Unreachable code:HIGH -raising-bad-type:54:4:54:22:test_ignores_returns_use_only_names:Raising int while only classes or instances are allowed:UNDEFINED +raising-bad-type:54:4:54:22:test_ignores_returns_use_only_names:Raising int while only classes or instances are allowed:INFERENCE diff --git a/tests/functional/i/invalid/invalid_exceptions/invalid_exceptions_raised.txt b/tests/functional/i/invalid/invalid_exceptions/invalid_exceptions_raised.txt index 9e8e7ae00..f2ccd8a05 100644 --- a/tests/functional/i/invalid/invalid_exceptions/invalid_exceptions_raised.txt +++ b/tests/functional/i/invalid/invalid_exceptions/invalid_exceptions_raised.txt @@ -1,11 +1,11 @@ -raising-non-exception:38:4:38:30:bad_case0:Raising a new style class which doesn't inherit from BaseException:UNDEFINED -raising-non-exception:42:4:42:25:bad_case1:Raising a new style class which doesn't inherit from BaseException:UNDEFINED -raising-non-exception:48:4:48:30:bad_case2:Raising a new style class which doesn't inherit from BaseException:UNDEFINED -raising-non-exception:52:4:52:23:bad_case3:Raising a new style class which doesn't inherit from BaseException:UNDEFINED -notimplemented-raised:56:4:56:31:bad_case4:NotImplemented raised - should raise NotImplementedError:UNDEFINED -raising-bad-type:60:4:60:11:bad_case5:Raising int while only classes or instances are allowed:UNDEFINED -raising-bad-type:64:4:64:14:bad_case6:Raising NoneType while only classes or instances are allowed:UNDEFINED -raising-non-exception:68:4:68:14:bad_case7:Raising a new style class which doesn't inherit from BaseException:UNDEFINED -raising-non-exception:72:4:72:15:bad_case8:Raising a new style class which doesn't inherit from BaseException:UNDEFINED -raising-non-exception:76:4:76:14:bad_case9:Raising a new style class which doesn't inherit from BaseException:UNDEFINED -raising-bad-type:110:4:110:18:bad_case10:Raising str while only classes or instances are allowed:UNDEFINED +raising-non-exception:38:4:38:30:bad_case0:Raising a new style class which doesn't inherit from BaseException:INFERENCE +raising-non-exception:42:4:42:25:bad_case1:Raising a new style class which doesn't inherit from BaseException:INFERENCE +raising-non-exception:48:4:48:30:bad_case2:Raising a new style class which doesn't inherit from BaseException:INFERENCE +raising-non-exception:52:4:52:23:bad_case3:Raising a new style class which doesn't inherit from BaseException:INFERENCE +notimplemented-raised:56:4:56:31:bad_case4:NotImplemented raised - should raise NotImplementedError:HIGH +raising-bad-type:60:4:60:11:bad_case5:Raising int while only classes or instances are allowed:INFERENCE +raising-bad-type:64:4:64:14:bad_case6:Raising NoneType while only classes or instances are allowed:INFERENCE +raising-non-exception:68:4:68:14:bad_case7:Raising a new style class which doesn't inherit from BaseException:INFERENCE +raising-non-exception:72:4:72:15:bad_case8:Raising a new style class which doesn't inherit from BaseException:INFERENCE +raising-non-exception:76:4:76:14:bad_case9:Raising a new style class which doesn't inherit from BaseException:INFERENCE +raising-bad-type:110:4:110:18:bad_case10:Raising str while only classes or instances are allowed:INFERENCE diff --git a/tests/functional/m/misplaced_bare_raise.txt b/tests/functional/m/misplaced_bare_raise.txt index d26893e3f..dbb20c266 100644 --- a/tests/functional/m/misplaced_bare_raise.txt +++ b/tests/functional/m/misplaced_bare_raise.txt @@ -1,7 +1,7 @@ -misplaced-bare-raise:6:4:6:9::The raise statement is not inside an except clause:UNDEFINED -misplaced-bare-raise:36:16:36:21:test1.best:The raise statement is not inside an except clause:UNDEFINED -misplaced-bare-raise:39:4:39:9:test1:The raise statement is not inside an except clause:UNDEFINED -misplaced-bare-raise:40:0:40:5::The raise statement is not inside an except clause:UNDEFINED -misplaced-bare-raise:49:4:49:9::The raise statement is not inside an except clause:UNDEFINED -misplaced-bare-raise:57:4:57:9:A:The raise statement is not inside an except clause:UNDEFINED -misplaced-bare-raise:68:4:68:9::The raise statement is not inside an except clause:UNDEFINED +misplaced-bare-raise:6:4:6:9::The raise statement is not inside an except clause:HIGH +misplaced-bare-raise:36:16:36:21:test1.best:The raise statement is not inside an except clause:HIGH +misplaced-bare-raise:39:4:39:9:test1:The raise statement is not inside an except clause:HIGH +misplaced-bare-raise:40:0:40:5::The raise statement is not inside an except clause:HIGH +misplaced-bare-raise:49:4:49:9::The raise statement is not inside an except clause:HIGH +misplaced-bare-raise:57:4:57:9:A:The raise statement is not inside an except clause:HIGH +misplaced-bare-raise:68:4:68:9::The raise statement is not inside an except clause:HIGH diff --git a/tests/functional/r/raising/raising_bad_type.txt b/tests/functional/r/raising/raising_bad_type.txt index 28fcfadc6..04ea2d170 100644 --- a/tests/functional/r/raising/raising_bad_type.txt +++ b/tests/functional/r/raising/raising_bad_type.txt @@ -1 +1 @@ -raising-bad-type:3:0:3:31::Raising tuple while only classes or instances are allowed:UNDEFINED +raising-bad-type:3:0:3:31::Raising tuple while only classes or instances are allowed:INFERENCE diff --git a/tests/functional/r/raising/raising_format_tuple.txt b/tests/functional/r/raising/raising_format_tuple.txt index 5f9283bb1..a6456bc84 100644 --- a/tests/functional/r/raising/raising_format_tuple.txt +++ b/tests/functional/r/raising/raising_format_tuple.txt @@ -1,7 +1,7 @@ -raising-format-tuple:11:4:11:38:bad_percent:Exception arguments suggest string formatting might be intended:UNDEFINED -raising-format-tuple:19:4:19:53:bad_multiarg:Exception arguments suggest string formatting might be intended:UNDEFINED -raising-format-tuple:27:4:27:40:bad_braces:Exception arguments suggest string formatting might be intended:UNDEFINED -raising-format-tuple:35:4:37:52:bad_multistring:Exception arguments suggest string formatting might be intended:UNDEFINED -raising-format-tuple:41:4:43:53:bad_triplequote:Exception arguments suggest string formatting might be intended:UNDEFINED -raising-format-tuple:47:4:47:36:bad_unicode:Exception arguments suggest string formatting might be intended:UNDEFINED -raising-format-tuple:52:4:52:56:raise_something_without_name:Exception arguments suggest string formatting might be intended:UNDEFINED +raising-format-tuple:11:4:11:38:bad_percent:Exception arguments suggest string formatting might be intended:HIGH +raising-format-tuple:19:4:19:53:bad_multiarg:Exception arguments suggest string formatting might be intended:HIGH +raising-format-tuple:27:4:27:40:bad_braces:Exception arguments suggest string formatting might be intended:HIGH +raising-format-tuple:35:4:37:52:bad_multistring:Exception arguments suggest string formatting might be intended:HIGH +raising-format-tuple:41:4:43:53:bad_triplequote:Exception arguments suggest string formatting might be intended:HIGH +raising-format-tuple:47:4:47:36:bad_unicode:Exception arguments suggest string formatting might be intended:HIGH +raising-format-tuple:52:4:52:56:raise_something_without_name:Exception arguments suggest string formatting might be intended:HIGH diff --git a/tests/functional/r/raising/raising_non_exception.txt b/tests/functional/r/raising/raising_non_exception.txt index efa816a5f..5cab16846 100644 --- a/tests/functional/r/raising/raising_non_exception.txt +++ b/tests/functional/r/raising/raising_non_exception.txt @@ -1 +1 @@ -raising-non-exception:13:0:13:22::Raising a new style class which doesn't inherit from BaseException:UNDEFINED +raising-non-exception:13:0:13:22::Raising a new style class which doesn't inherit from BaseException:INFERENCE |