Claudiu Popa
69f480dfe6
Allow more powerful regexes for generated-members. Close #1167
2016-12-31 12:28:10 +02:00
Alexander Todorov
53414376fd
Add new extension for detecting integer comparisons against zero ( #1243 )
2016-12-31 11:10:45 +02:00
Derek Gustafson
9b1e5a90fd
Fix errors introduced by change to arguments-differ ( #1252 )
2016-12-31 11:06:05 +02:00
Claudiu Popa
6712bbe458
Change the text of arguments-differ by making it more explicit
2016-12-30 19:28:32 +02:00
Claudiu Popa
607e2bfcb2
Take in consideration the dummy-rgx-variable when checking for different parameters. Close #1041
2016-12-30 19:24:59 +02:00
Pedro Algarvio
d7ee7d8092
Ignore shebang's, coding lines and pylint comments ( #1250 )
2016-12-30 17:55:52 +02:00
Łukasz Rogalski
d23b8ca66a
consider-iterating-dictionary: fix false-negatives ( #1251 )
...
Resolves #1247
2016-12-30 17:52:13 +02:00
Claudiu Popa
b89693399d
Use the dunder lookup to retrieve the special methods. Close #1023
2016-12-30 17:06:32 +02:00
Łukasz Rogalski
2304d03121
fix pytest-warning; TestReporter is not a class that contains tests ( #1249 )
2016-12-30 11:30:05 +02:00
Alexander Todorov
97a6a4fa0d
Add new extension for comparison against empty string constants ( #1183 )
2016-12-29 17:37:10 +02:00
Łukasz Rogalski
da30aaabb4
test_functional: assign user-friendly names to parametrised tests ( #1248 )
2016-12-29 17:28:43 +02:00
Łukasz Rogalski
fa85784379
consider-iterating-dictionary: fix case when comprehensions were used in assignments ( #1244 )
2016-12-29 13:49:35 +02:00
Petr Pulc
ddf066f8e7
Omit convention warnings on assignment with type hints ( #1229 )
...
Require spaces around default value assignment with type hints, such as in the following example:
Example:
def my_function(variable: str = ''): # this should not emit bad-whitespace
print(variable)
2016-12-27 18:44:05 +02:00
Claudiu Popa
c74caf11db
Drop _get from name and some style fixes.
2016-12-27 17:41:12 +02:00
Moises Lopez - https://www.vauxoo.com/
bbc746c2f2
Check the number of elements before attempting to unpack them
2016-12-27 17:40:51 +02:00
Łukasz Rogalski
f83dd399e5
Fix too-many-nested-blocks ( #1228 )
...
Fix too-many-nested-blocks, where last nested block in function was
excluded from analysis.
Closes #1088
2016-12-21 21:51:26 +02:00
Derek Gustafson
1bb7712d21
Remove unittest dependancy of test_overlapping_exceptions ( #1232 )
2016-12-21 20:46:10 +02:00
Łukasz Rogalski
b3b1d0011e
MessagesHandlerMixIn: extract common private method ( #1226 )
...
Merge enable() and disable() method core logic into a private method, which is used internally by the two aforementioned methods. This reduces the lines of code and provides a common point of modification of the enabling/disabling mechanism in pylint.
2016-12-19 09:43:37 +02:00
Łukasz Rogalski
dd15541d14
design_analysis: simplify getting count of ignored arguments
2016-12-19 09:39:34 +02:00
Claudiu Popa
9a59ec4bb8
Improve the message of no-else-return
2016-12-19 09:37:49 +02:00
Claudiu Popa
c5c79c47db
Extract the value using tuple indexing, so that it will work on Python 2.
2016-12-18 21:52:55 +02:00
Claudiu Popa
6ae2b7704b
'trailing-comma-tuple' check was added
...
This message is emitted when pylint finds an one-element tuple,
created by a stray comma. This can suggest a potential problem in the
code and it is recommended to use parantheses in order to emphasise the
creation of a tuple, rather than relying on the comma itself.
Close #300
2016-12-18 21:41:29 +02:00
Claudiu Popa
7aee3e3b29
Simplify the test case so it can pass on Windows.
2016-12-18 20:24:53 +02:00
Claudiu Popa
4a15be419c
Don't emit used-before-assignment in certain single statement functions
...
If a single statement function has a particular variable and the statement
is on the same line as the function definition, then we were going to emit
used-before-assignment for that particular value. This was wrong, since
the variable was used after the definition.
Part of #1135
2016-12-18 20:06:10 +02:00
Claudiu Popa
4b053f5cbc
Fix formatting and use any() to simplify the check
2016-12-18 15:28:59 +02:00
Claudiu Popa
cacb4566d9
Allow running tests without installing, using pytest and setuptools. Close #1062
2016-12-18 14:50:50 +02:00
Claudiu Popa
c6f6f963e2
Remove tests which depend on external libraries.
2016-12-18 14:24:37 +02:00
Claudiu Popa
3ccad8c270
Merge pull request #1199 from degustaf/pytest
...
Replace unittest with pytest
2016-12-18 11:25:02 +02:00
Łukasz Rogalski
1e44d42aca
New refactoring checker: consider-using-ternary ( #1210 )
...
This check is emitted when pylint encounters constructs which were used to emulate ternary statement before it was introduced in Python 2.5.
Close #1204
2016-12-18 11:13:51 +02:00
Derek Gustafson
1ad6cb3431
Make removed tests pass.
2016-12-17 21:37:52 +00:00
Erik Eriksson
4fa3659663
Simplify loop.
2016-12-16 22:36:45 +02:00
Łukasz Rogalski
fca2e0f514
Improve metaclass detection in nested scopes in Python 3 ( #1202 )
...
Closes #1177
2016-12-16 16:16:19 +02:00
Claudiu Popa
ea14cad318
Don't emit not-callable for instances with unknown base classes. Close #1213
2016-12-16 16:02:54 +02:00
Erik
ea4273cdff
Extracted overlapping exceptions checker into extension
2016-12-15 14:37:40 +02:00
Derek Gustafson
38e25ba9f8
Fix PCManticore concerns.
2016-12-14 14:13:37 +00:00
Claudiu Popa
2fa1885186
Simplify the code to not use assertion and exceptions.
2016-12-14 10:29:59 +02:00
y2kbugger
5936066d92
update the check for ansi terminals
...
Check for 'xterm-16color' and 'xterm-256color'
2016-12-14 10:28:25 +02:00
Derek Gustafson
7aa5d4be7c
Aliasing an import with underscore skips unused-import check
...
Close #1190
2016-12-14 09:25:15 +02:00
Łukasz Rogalski
740d250d1f
Add a new option for finding unused global variables.
...
Closes #919
2016-12-13 22:07:15 +02:00
Derek Gustafson
292cb9b2e9
Added pyargs back to tox.ini
2016-12-10 19:19:04 +00:00
Łukasz Rogalski
519d6a4b8a
Fix CLI output for fixme messages
...
When file has CRLF line separators, CR was kept in msg. This CR made
CLI output behave unexpectedly.
Solves #1139
2016-12-10 00:34:27 +02:00
Łukasz Rogalski
4dec9d61c5
Fix spelling
2016-12-08 23:41:50 +02:00
Derek Gustafson
2fa1375777
Remove unneeded test utilities.
2016-12-08 20:59:15 +00:00
Derek Gustafson
3f7b2c626d
Parametrized tests
2016-12-08 20:34:58 +00:00
Derek Gustafson
197555aecf
Removed setup and teardown functions.
2016-12-08 20:29:37 +00:00
Derek Gustafson
3d14bcb35e
Remove pytest.main calls.
2016-12-07 15:57:51 +00:00
Derek Gustafson
4faacf2119
Reduce dependency on unittest
2016-12-06 16:07:00 +00:00
Derek Gustafson
72ea777b1f
Added test_functional tests back in.
2016-12-06 15:49:33 +00:00
Derek Gustafson
5ff3e04e42
Added test_func tests back in.
2016-12-06 15:49:32 +00:00
Derek Gustafson
2e692c6d12
Fix pylint warnings.
2016-12-06 15:49:32 +00:00