summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Prepare 2.2.3pylint-2.2.32.2Claudiu Popa2019-03-032-2/+7
|
* Prepare 2.2.2pylint-2.2.2Claudiu Popa2018-11-281-1/+1
|
* Fix the documentationClaudiu Popa2018-11-281-2/+2
|
* Revert "Replace StopIterationCalls in ForwardSlashChunker with returns."Claudiu Popa2018-11-281-5/+5
| | | | | | | | This reverts commit 7de1f56047d5939f1d5670884160301792d1d51b. pyenchant was using StopIteration explicitly so there's no need to replace that with returns as it doesn't conflict with PEP 479. The original issue had a separate problem that wasn't related to this checker.
* Replace StopIterationCalls in ForwardSlashChunker with returns.Claudiu Popa2018-11-281-5/+5
| | | | Thanks @antonenk. Close #2579
* Change the ``logging-format-style`` to use name identifier instead of their ↵Claudiu Popa2018-11-284-7/+36
| | | | | | | | | | | corresponding Python identifiers This is to prevent users having to think about escaping the default value for ``logging-format-style`` in the generated config file. Also our config parsing utilities don't quite support escaped values when it comes to ``choices`` detection, so this would have needed various hacks around that. Close #2614
* Set _module_pkg on init as well, not just on open. Close #2613Claudiu Popa2018-11-271-0/+1
|
* Prepare 2.2.1pylint-2.2.1Claudiu Popa2018-11-271-1/+1
|
* implicit-str-concat-in-sequence: Handling lines with multi-bytes characters ↵Lucas Cimon2018-11-266-4/+24
| | | | - fix #2610 (#2611)
* Forgot to update the documentation as wellpylint-2.2.0Claudiu Popa2018-11-251-2/+2
|
* Prepare 2.2Claudiu Popa2018-11-252-3/+6
|
* Fixed literal-comparison for the case of 0 and 1 (#2601)Sergei Lebedev2018-11-235-3/+21
| | | | | | | | | | | | | | | Prior to this commit literal-comparison did not fire for the following comparisons x is 0 x is 1 due to a subtle bug in the checker implementation. The skip condition in the ``ComparisonChecker._check_literal_comparison`` was literal.value in (True, False, None) which holds for True/False/None _as well as_ 0 and 1, since 0 == False and 1 == True.
* Update README.rst (#2580)Stephen Longofono2018-11-061-1/+4
| | | As given, the install instructions gather a version of PyLint which does not support all the features of Python 3.6. For example, as of 11/3/2018, f-strings are not supported, and pyreverse3 will fail reporting a syntax error. After running upgrade as prescribed in the new instructions, this problem is solved.
* Fix typo in msg description (#2548)Mike Miller2018-10-112-1/+3
|
* Consider ``range()`` objects for ``undefined-loop-variable`` leaking from ↵Claudiu Popa2018-10-117-22/+45
| | | | | | iteration. Close #2533
* Adding implicit-str-concat-in-sequence check (#1655)Lucas Cimon2018-10-1022-52/+186
| | | | | ``implicit-str-concat-in-sequence`` detects string concatenation inside lists, sets & tuples. It would warn on code such as `('a', 'b' 'c')`.
* Make some minor revisions/corrections to the docs (#2542)Adam Parkin2018-10-104-37/+33
| | | | | | | | Makes some minor revisions & grammatical corrections to the docs. Some notable items: - tries to make references to PEP 8 consistent (rather than PEP-8, PEP 8, PEP-08, etc) - general typos
* New option: logging-format-style for logging checker (#2521)Alan Chan2018-10-048-101/+146
| | | | | | | | logging-format-style accepts one of '%' or '{', (defaults to '%'). When '{' is selected, logging checker assumes str.format() style format strings for calls to the logging. pylint was unable to count the required number of args for the format string when the format string was using the `{` format. The new feature indirectly fixes that by allowing the proper interpretation of that format string.
* dict-iter-method and dict-view-method no longer determines if the operand is ↵Claudiu Popa2018-10-022-32/+18
| | | | | | | a dictionary This inhibits the capability of the check of finding occurrences of these methods. There's a low chance of having a false positive.
* ``deprecated-method`` can use the attribute name for identifying a ↵Claudiu Popa2018-10-023-23/+52
| | | | | | | | | | | | deprecated method Previously we were using the fully qualified name, which we still do, but the fully qualified name for some ``unittest`` deprecated aliases leads to a generic deprecation function. Instead on relying on that, we now also rely on the attribute name, which should solve some false positives. Close #1653 Close #1946
* GrammarClaudiu Popa2018-10-021-1/+1
|
* using-constant-test has a false positive when using getattr(), so disable ↵Claudiu Popa2018-10-011-1/+1
| | | | that error locally
* Obtain the correct number of CPUs for virtualized or containerized environments.Claudiu Popa2018-10-012-1/+16
| | | | Close #2519
* fix compatibility with unreleased changes to stdlib tokenizerMichael Hudson-Doyle2018-10-013-1/+8
| | | | | | | | | | https://github.com/python/cpython/commit/c4ef4896eac86a6759901c8546e26de4695a1389 (not yet in any released version, but it's been backported to all versions of Python in git, even 2.7!) changed the behaviour in the stdlib's tokenize module to emit a synthetic NEWLINE token even if the file does not end with a newline. This was causing a spurious "mixed-line-endings" warning to be emitted, but luckily the synthetic token is easy to test for (the token text is "").
* Fix formatting errorsClaudiu Popa2018-09-292-16/+29
|
* ``pylint`` is less eager to consume the whole line for pragmasClaudiu Popa2018-09-294-2/+25
| | | | | | | | The regex was adapted so that we either stop at one of `;` or `#`, or at the end of the line. This should improve the situation a little bit when dealing with the flags of other linters. Close #2485
* Move func_block_disable_msg into regrtest_data, because we already have a ↵Claudiu Popa2018-09-294-15/+2
| | | | test for it in unittest_utils
* Save the first group into a variable and use that insteadClaudiu Popa2018-09-291-5/+7
|
* Use ast to handle PEP 328 multi-line importsScott Worley2018-09-296-5/+93
| | | | | | | Closes #1422 Closes #2019 This fixes #1422 and fixes #2019.
* Correct test fileClaudiu Popa2018-09-291-1/+0
|
* Don't suggest identity check against the interpreter's True or False builtin ↵Claudiu Popa2018-09-294-29/+14
| | | | | | values, prefer boolyness instead Close #2527
* Add test case that deprecated method is emitted for unittest methods. Close ↵Claudiu Popa2018-09-292-0/+15
| | | | #2226
* Add test case for logging-* errors for subclasses of logging.Logger. Close #960Claudiu Popa2018-09-292-1/+12
|
* Separate pyenchant into a separate stepClaudiu Popa2018-09-292-2/+15
| | | | | | | | pyenchant is no longer maintained and doesn't seem to install correctly on all systems. But it is installable on Travis, so instead we separated that from the main test suite in order to run it in its own step. Close #1900
* Change ``unbalanced-tuple-unpacking`` back to a warning.Claudiu Popa2018-09-292-2/+12
| | | | | | | | | | It used to be a warning until a couple of years ago, after it was promoted to an error. But the check might be suggesting the wrong thing in some cases, for instance when checking against ``sys.argv`` which cannot be known at static analysis time. Given it might rely on potential unknown data, it's best to have it as a warning. Close #2522
* [doc] Support specifying the Python interpreterBenjamin Drung2018-09-281-2/+3
| | | | | | | | On Debian, the binary `python` will always point to Python 2. When building the documentation, there is no way to change the Python interpreter to Python 3 on Debian. Therefore allow specifying PYTHON to override the Python interpreter.
* Add myself to contributorsBenjamin Drung2018-09-281-0/+2
|
* Fix TypeError in test_good_comprehension_checksBenjamin Drung2018-09-281-7/+7
| | | | | | | | | | | | | | | | | 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.
* Fix Windows newlines (CRLF) to Unix newlines (LF)Benjamin Drung2018-09-281-141/+141
| | | | | | | | | | | | | | | | | | 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>
* Fix utils.is_subclass_of to be aware of complex hierarchies (#2508)Sushobhit2018-09-284-10/+33
|
* Move the type check of the target after checking for invalid star assignment ↵Claudiu Popa2018-09-251-5/+4
| | | | targets
* Fix the lint errorsClaudiu Popa2018-09-251-3/+3
|
* Handle recursively the count of Starred nodes in assignmentsClaudiu Popa2018-09-243-15/+22
|
* Make sure that index is defined by assigning it to None before the loopClaudiu Popa2018-09-231-4/+5
|
* Update tutorial docs (#2511)Ben James2018-09-231-173/+75
| | | Close #2118
* Simplify the code to remove the need for a linter disableClaudiu Popa2018-09-231-1/+4
|
* Emit ``too-many-starred-assignment`` only when the number of Starred nodes ↵Claudiu Popa2018-09-233-4/+18
| | | | | | | | | | | | | | | | is per assignment elements Nested assignment tuples can each have a single starred assignment, as in the following example: ((a, *b), *c) = ... The check was previously unflattening the occurrences of Starred nodes, resulting in a total number of 2 Starred nodes for the given assignment tuple, while in fact there is just one starred node for the first tuple, followed by a separate second starred node. Close #2513
* No enumerate check in __iter__ (#2505)Ben James2018-09-225-2/+34
| | | | | | Don't suggest enumerate when defining `__iter__` and operating on the underlying class Closes #2477
* Add pytest.ini to MANIFESTClaudiu Popa2018-09-201-0/+1
|
* Added check simplifiable-if-expression (#2502)Tomer Chachamu2018-09-206-1/+72
| | | | | | Similar to simplifiable-if-statement, it finds trivial ternary statements and suggested replacing them. Paired-with: Richard Goodman <richardg@brandwatch.com>