| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
This is emitted in case a call to a function is made inside a test but it misses parentheses.
It is a more specialised form of `using-constant-test`, but tailored specifically to callables.
Close #2658
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following expression from test_good_comprehension_checks will fail
to execute, because the list element from the range function has the
type int and int has no len method:
```
>>> [data for data in range(100) if len(data)]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 1, in <listcomp>
TypeError: object of type 'int' has no len()
```
Use the built-in `abs` method instead of the `len` method to make the
test case a little bit more realistic.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several files in pylint/test/functional have Windows newlines (CRLF)
instead of Unix newlines (LF). To list these files, run:
```
find . -type f -exec file "{}" ";" | grep CRLF
```
This commit corrects the line endings of the file that the following
commit will touch by running following command:
```
perl -pi -e 's/\r\n/\n/g' pylint/test/functional/using_constant_test.py
```
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
|
|
|
|
|
|
|
|
|
|
| |
adapt existing test/input test cases to new check.
add some more positive test case for useless-object-inheritance
msg code was in conflict with existing msg.
adapt existing test cases for new checker.
|
|
|
|
|
| |
methods. (#1641)
Close #1267
|
| |
|
| |
|
|
This new warning is emitted when a conditional statement (If, IfExp) uses a test
which is always constant, such as numbers, classes, functions etc.
This is most likely an error from the user's part. Closes issue #524.
|