-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[basic checker] Add the confidence for 'unreachable' (#7216)
- Loading branch information
1 parent
2da790a
commit a787940
Showing
11 changed files
with
43 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
unreachable:25:4:25:25:test_ignores_raise_uninferable:Unreachable code:UNDEFINED | ||
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:UNDEFINED | ||
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 |
14 changes: 7 additions & 7 deletions
14
tests/functional/ext/docparams/raise/missing_raises_doc_Google.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
missing-raises-doc:6:0:6:35:test_find_missing_google_raises:"""RuntimeError"" not documented as being raised":HIGH | ||
unreachable:13:4:13:25:test_find_missing_google_raises:Unreachable code:UNDEFINED | ||
unreachable:13:4:13:25:test_find_missing_google_raises:Unreachable code:HIGH | ||
missing-raises-doc:38:0:38:46:test_find_valid_missing_google_attr_raises:"""error"" not documented as being raised":HIGH | ||
unreachable:83:4:83:25:test_find_all_google_raises:Unreachable code:UNDEFINED | ||
unreachable:94:4:94:25:test_find_multiple_google_raises:Unreachable code:UNDEFINED | ||
unreachable:95:4:95:30:test_find_multiple_google_raises:Unreachable code:UNDEFINED | ||
unreachable:96:4:96:27:test_find_multiple_google_raises:Unreachable code:UNDEFINED | ||
unreachable:83:4:83:25:test_find_all_google_raises:Unreachable code:HIGH | ||
unreachable:94:4:94:25:test_find_multiple_google_raises:Unreachable code:HIGH | ||
unreachable:95:4:95:30:test_find_multiple_google_raises:Unreachable code:HIGH | ||
unreachable:96:4:96:27:test_find_multiple_google_raises:Unreachable code:HIGH | ||
missing-raises-doc:99:0:99:36:test_find_rethrown_google_raises:"""RuntimeError"" not documented as being raised":HIGH | ||
missing-raises-doc:113:0:113:45:test_find_rethrown_google_multiple_raises:"""RuntimeError, ValueError"" not documented as being raised":HIGH | ||
missing-raises-doc:148:4:148:18:Foo.foo_method:"""AttributeError"" not documented as being raised":HIGH | ||
unreachable:158:8:158:17:Foo.foo_method:Unreachable code:UNDEFINED | ||
unreachable:180:8:180:17:Foo.foo_method:Unreachable code:UNDEFINED | ||
unreachable:158:8:158:17:Foo.foo_method:Unreachable code:HIGH | ||
unreachable:180:8:180:17:Foo.foo_method:Unreachable code:HIGH | ||
missing-raises-doc:183:4:183:18:Foo.foo_method:"""AttributeError"" not documented as being raised":HIGH | ||
using-constant-test:190:11:190:15:Foo.foo_method:Using a conditional statement with a constant value:INFERENCE |
10 changes: 5 additions & 5 deletions
10
tests/functional/ext/docparams/raise/missing_raises_doc_Numpy.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
missing-raises-doc:11:0:11:34:test_find_missing_numpy_raises:"""RuntimeError"" not documented as being raised":HIGH | ||
unreachable:20:4:20:25:test_find_missing_numpy_raises:Unreachable code:UNDEFINED | ||
unreachable:34:4:34:25:test_find_all_numpy_raises:Unreachable code:UNDEFINED | ||
unreachable:20:4:20:25:test_find_missing_numpy_raises:Unreachable code:HIGH | ||
unreachable:34:4:34:25:test_find_all_numpy_raises:Unreachable code:HIGH | ||
missing-raises-doc:37:0:37:35:test_find_rethrown_numpy_raises:"""RuntimeError"" not documented as being raised":HIGH | ||
missing-raises-doc:53:0:53:44:test_find_rethrown_numpy_multiple_raises:"""RuntimeError, ValueError"" not documented as being raised":HIGH | ||
missing-raises-doc:111:0:111:45:test_find_valid_missing_numpy_attr_raises:"""error"" not documented as being raised":HIGH | ||
missing-raises-doc:146:4:146:11:Foo.foo:"""AttributeError"" not documented as being raised":HIGH | ||
unreachable:158:8:158:17:Foo.foo:Unreachable code:UNDEFINED | ||
unreachable:182:8:182:17:Foo.foo:Unreachable code:UNDEFINED | ||
unreachable:158:8:158:17:Foo.foo:Unreachable code:HIGH | ||
unreachable:182:8:182:17:Foo.foo:Unreachable code:HIGH | ||
missing-raises-doc:185:4:185:11:Foo.foo:"""AttributeError"" not documented as being raised":HIGH | ||
unreachable:215:8:215:17:Foo.foo:Unreachable code:UNDEFINED | ||
unreachable:215:8:215:17:Foo.foo:Unreachable code:HIGH |
14 changes: 7 additions & 7 deletions
14
tests/functional/ext/docparams/raise/missing_raises_doc_Sphinx.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
missing-raises-doc:7:0:7:35:test_find_missing_sphinx_raises:"""RuntimeError"" not documented as being raised":HIGH | ||
unreachable:13:4:13:25:test_find_missing_sphinx_raises:Unreachable code:UNDEFINED | ||
unreachable:36:4:36:25:test_find_all_sphinx_raises:Unreachable code:UNDEFINED | ||
unreachable:37:4:37:30:test_find_all_sphinx_raises:Unreachable code:UNDEFINED | ||
unreachable:38:4:38:27:test_find_all_sphinx_raises:Unreachable code:UNDEFINED | ||
unreachable:48:4:48:25:test_find_multiple_sphinx_raises:Unreachable code:UNDEFINED | ||
unreachable:13:4:13:25:test_find_missing_sphinx_raises:Unreachable code:HIGH | ||
unreachable:36:4:36:25:test_find_all_sphinx_raises:Unreachable code:HIGH | ||
unreachable:37:4:37:30:test_find_all_sphinx_raises:Unreachable code:HIGH | ||
unreachable:38:4:38:27:test_find_all_sphinx_raises:Unreachable code:HIGH | ||
unreachable:48:4:48:25:test_find_multiple_sphinx_raises:Unreachable code:HIGH | ||
missing-raises-doc:51:0:51:37:test_finds_rethrown_sphinx_raises:"""RuntimeError"" not documented as being raised":HIGH | ||
missing-raises-doc:64:0:64:46:test_finds_rethrown_sphinx_multiple_raises:"""RuntimeError, ValueError"" not documented as being raised":HIGH | ||
missing-raises-doc:90:0:90:55:test_find_missing_sphinx_raises_infer_from_instance:"""RuntimeError"" not documented as being raised":HIGH | ||
unreachable:97:4:97:25:test_find_missing_sphinx_raises_infer_from_instance:Unreachable code:UNDEFINED | ||
unreachable:97:4:97:25:test_find_missing_sphinx_raises_infer_from_instance:Unreachable code:HIGH | ||
missing-raises-doc:100:0:100:55:test_find_missing_sphinx_raises_infer_from_function:"""RuntimeError"" not documented as being raised":HIGH | ||
unreachable:110:4:110:25:test_find_missing_sphinx_raises_infer_from_function:Unreachable code:UNDEFINED | ||
unreachable:110:4:110:25:test_find_missing_sphinx_raises_infer_from_function:Unreachable code:HIGH | ||
missing-raises-doc:133:0:133:46:test_find_valid_missing_sphinx_attr_raises:"""error"" not documented as being raised":HIGH |
4 changes: 2 additions & 2 deletions
4
tests/functional/ext/docparams/return/missing_return_doc_Google.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
redundant-returns-doc:43:0:43:11:my_func:Redundant returns documentation:HIGH | ||
redundant-returns-doc:52:0:52:11:my_func:Redundant returns documentation:HIGH | ||
redundant-returns-doc:61:0:61:11:my_func:Redundant returns documentation:HIGH | ||
unreachable:95:8:95:17:Foo.foo_method:Unreachable code:UNDEFINED | ||
unreachable:112:8:112:17:Foo.foo_method:Unreachable code:UNDEFINED | ||
unreachable:95:8:95:17:Foo.foo_method:Unreachable code:HIGH | ||
unreachable:112:8:112:17:Foo.foo_method:Unreachable code:HIGH | ||
useless-param-doc:167:4:167:18:Foo.foo_method:"""_, _ignored"" useless ignored parameter documentation":HIGH | ||
useless-type-doc:167:4:167:18:Foo.foo_method:"""_"" useless ignored parameter type documentation":HIGH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
unreachable:7:4:7:24:func1:Unreachable code:UNDEFINED | ||
unreachable:12:8:12:28:func2:Unreachable code:UNDEFINED | ||
unreachable:18:8:18:28:func3:Unreachable code:UNDEFINED | ||
unreachable:22:4:22:16:func4:Unreachable code:UNDEFINED | ||
unreachable:35:4:35:24:func6:Unreachable code:UNDEFINED | ||
unreachable:7:4:7:24:func1:Unreachable code:HIGH | ||
unreachable:12:8:12:28:func2:Unreachable code:HIGH | ||
unreachable:18:8:18:28:func3:Unreachable code:HIGH | ||
unreachable:22:4:22:16:func4:Unreachable code:HIGH | ||
unreachable:35:4:35:24:func6:Unreachable code:HIGH |