remove redundant inline casts in arguments where the type is inferred by the call target

This commit is contained in:
Erik Krogh Kristensen
2021-10-29 14:37:56 +02:00
parent 15c90adec5
commit d36c66cfca
29 changed files with 51 additions and 60 deletions

View File

@@ -210,9 +210,9 @@ class CommentedOutCodeBlock extends @py_comment {
/** Whether this commented-out code block is likely to be example code embedded in a larger comment. */
predicate maybeExampleCode() {
exists(CommentBlock block | block.contains(this.(Comment)) |
exists(CommentBlock block | block.contains(this) |
exists(int all_code |
all_code = sum(CommentedOutCodeBlock code | block.contains(code.(Comment)) | code.length()) and
all_code = sum(CommentedOutCodeBlock code | block.contains(code) | code.length()) and
/* This ratio may need fine tuning */
block.length() > all_code * 2
)