Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Move refactoring to a package in order to burst it | Pierre Sassoulas | 2020-09-05 | 1 | -1672/+0 |
| | |||||
* | Add simplifiable-condition and condition-evals-to-constant to the ↵ | ethan-leba | 2020-08-31 | 1 | -1/+94 |
| | | | | refactoring checker | ||||
* | Add bool() check for len-as-condition | ethan-leba | 2020-08-31 | 1 | -21/+26 |
| | |||||
* | Sets up copyright | hippo91 | 2020-08-20 | 1 | -0/+1 |
| | |||||
* | Minor typo fix in R1721 help string | lrjball | 2020-07-04 | 1 | -1/+1 |
| | | | typo fix, identitiy -> identity | ||||
* | Address the super violations in the codebase | Claudiu Popa | 2020-05-05 | 1 | -5/+8 |
| | |||||
* | Rename the new old-style super with super-with-arguments | Claudiu Popa | 2020-05-05 | 1 | -0/+23 |
| | | | | | Also move it from the Python 3 checker to the refactoring one, as it's a better fit for it. | ||||
* | Add missing copyright annotations for the past releases | Claudiu Popa | 2020-04-27 | 1 | -4/+17 |
| | |||||
* | Fix false-negative cases for trailing-comma-tuple | Yang Yang | 2020-04-19 | 1 | -1/+1 |
| | | | | | | | The current logic for detecting trailing-comma-tuple violations fails to detect positive cases that span multiple lines because its look-back mechanism stops at the last NL or NEWLINE token when it should in fact stop at the last NEWLINE token only. | ||||
* | Refactor the dict.get detection code to be easier to understand | Claudiu Popa | 2020-04-03 | 1 | -18/+41 |
| | | | | Also add support for astroid.Index unpacking, which is gone in Python 3.9. | ||||
* | Pick a different name than slice to avoid overshadowing a builtin | Claudiu Popa | 2020-03-27 | 1 | -5/+5 |
| | |||||
* | Properly unwrap astroid.Index on Python 3.9+ | Claudiu Popa | 2020-03-27 | 1 | -4/+6 |
| | |||||
* | pyupgrade: automated removal of python2 constructs | Anthony Sottile | 2020-03-24 | 1 | -1/+0 |
| | | | | | | | | | | | | | using configuration: ```yaml - repo: https://github.com/asottile/pyupgrade rev: v2.1.0 hooks: - id: pyupgrade args: [--py3-plus, --keep-percent-format] exclude: ^tests/(extensions/data/|functional/|input/|regrtest_data/) ``` | ||||
* | Protect against passing a non-class to ↵ | Claudiu Popa | 2020-03-08 | 1 | -1/+1 |
| | | | | _check_exception_inherit_from_stopiteration | ||||
* | Protect against `exc` not having `pytype` | Claudiu Popa | 2020-03-08 | 1 | -1/+1 |
| | | | | | `pytype` is not defined on all nodes, but line 1175 assumed the result of `safe_infer()` might have it. | ||||
* | ``consider-using-sys-exit`` is no longer emitted when `exit` is imported in ↵ | Claudiu Popa | 2019-10-11 | 1 | -5/+12 |
| | | | | | | the local scope. Close #3147 | ||||
* | properly handle literals in ``unnecessary-comprehension`` checker, closes #3148 | Rémi Cardona | 2019-10-03 | 1 | -1/+3 |
| | |||||
* | expand nested ternaries in ``unnecessary-comprehension`` to proper if statements | Rémi Cardona | 2019-10-03 | 1 | -9/+6 |
| | |||||
* | ``consider-using-sys-exit`` is exempted when `exit()` is imported from `sys` | Claudiu Popa | 2019-09-30 | 1 | -1/+9 |
| | | | | Close #3145 | ||||
* | Simplify and improve the logic of consider-iterating-dictionary | Claudiu Popa | 2019-09-24 | 1 | -4/+9 |
| | |||||
* | Report unnecessary else after continue and break | Robert Schweizer | 2019-09-10 | 1 | -0/+32 |
| | | | | Close #2327 | ||||
* | Added a new check, consider-using-sys-exit, close #2925 (#3062) | Sushobhit | 2019-08-22 | 1 | -0/+11 |
| | | | Close #2925 | ||||
* | [pylint.checkers] Make the link between msgid and symbol strictly 1-1 | Pierre Sassoulas | 2019-08-19 | 1 | -2/+2 |
| | | | | | Will permit to improve performance with less check but more importantly simplify the message store a lot. | ||||
* | blacken the code | PHeanEX | 2019-07-16 | 1 | -17/+36 |
| | | | | I mean its ugly now, but if you want it like that: Here you go | ||||
* | Add new checker (unnecessary-comprehension) (close #2905) | PHeanEX | 2019-07-16 | 1 | -0/+41 |
| | |||||
* | Ignore ``consider-using-dict-comprehension`` for constructions that can't be ↵ | Claudiu Popa | 2019-06-20 | 1 | -3/+10 |
| | | | | | | converted to a comprehension Close #2963 | ||||
* | Style - Apply isort on all apllicable files | Pierre Sassoulas | 2019-03-20 | 1 | -5/+2 |
| | |||||
* | Make ``len-as-condition`` only fire when a ``len(x)`` call is made without ↵ | Paul Renvoise | 2019-03-19 | 1 | -136/+76 |
| | | | | | | | an explicit comparison This commit reduce the scope of `len-as-condition` to only care when a `len(SEQUENCE)` call is made without an explicit comparison, as stated in PEP8. | ||||
* | Kill some old names in favour of their corresponding check class | Claudiu Popa | 2019-02-13 | 1 | -3/+3 |
| | |||||
* | Generalize `chained-comparison` (#2655) | Justin Li | 2018-12-21 | 1 | -39/+42 |
| | | | | | | | | | | | | | | | `chained-comparison` detects boolean expressions such as `a < b and b < c` and suggests it should be rewritten as `a < b < c`. The current implementation is limited in two ways. First, cannot deal with existing chain comparisons, so it would not detect the following: `a < b < c and c < d` # should be a < b < c < d Second, the algorithm for detecting possible chains is simplistic, and would falsely detect the following: `a < b < c and b < d` # no simplification possible This change fixes both of these issues. | ||||
* | Add ``no-else-raise`` warning (R1720) (#2636) | Jim Robertson | 2018-12-11 | 1 | -6/+31 |
| | | | Close #2558 | ||||
* | Fix incorrect generation of ``no-else-raise`` warnings (R1705) (#2618) | Jim Robertson | 2018-12-07 | 1 | -14/+4 |
| | | | | | | | | Fixed issue where ``if`` statements with nested ``if`` statements were incorrectly being flagged as ``no-else-raise`` in some cases and not being flagged as ``no-else-raise`` in other cases. Added tests for verification and updated pylint source files to eliminate newly exposed warnings. | ||||
* | Adding implicit-str-concat-in-sequence check (#1655) | Lucas Cimon | 2018-10-10 | 1 | -4/+4 |
| | | | | | ``implicit-str-concat-in-sequence`` detects string concatenation inside lists, sets & tuples. It would warn on code such as `('a', 'b' 'c')`. | ||||
* | No enumerate check in __iter__ (#2505) | Ben James | 2018-09-22 | 1 | -0/+4 |
| | | | | | | Don't suggest enumerate when defining `__iter__` and operating on the underlying class Closes #2477 | ||||
* | Added check simplifiable-if-expression (#2502) | Tomer Chachamu | 2018-09-20 | 1 | -0/+34 |
| | | | | | | Similar to simplifiable-if-statement, it finds trivial ternary statements and suggested replacing them. Paired-with: Richard Goodman <richardg@brandwatch.com> | ||||
* | Reformat the code with black | Claudiu Popa | 2018-09-17 | 1 | -337/+481 |
| | |||||
* | ``consider-using-ternary`` and ``simplified-boolean-expression`` no longer ↵ | Claudiu Popa | 2018-09-05 | 1 | -15/+0 |
| | | | | | | | | emit for sequence based checks This was more of an heuristic than actual an useful check, so let's get rid of it. Close #2473 | ||||
* | ``simplifiable-if-statement`` not emitted when dealing with subscripts | Claudiu Popa | 2018-08-03 | 1 | -0/+2 |
| | |||||
* | `trailing-comma-tuple` gets emitted for ``yield`` statements as well. | Claudiu Popa | 2018-07-31 | 1 | -1/+3 |
| | | | | Close #2363 | ||||
* | Get only the arguments of the scope function for `redefined-argument-from-local` | Claudiu Popa | 2018-07-31 | 1 | -1/+2 |
| | | | | Close #2364 | ||||
* | Change refactoring nodes_of_class call to use skip_klass (#2351) | Nick Drozd | 2018-07-27 | 1 | -4/+2 |
| | | | | | | Calling nodes_of_class without a skip_klass and then filtering afterwards is slightly inefficient, but more importantly it's an unusual use of the function (this is the only example in Pylint where Return nodes are extracted without skipping FunctionDef). | ||||
* | Don't crash when `pylint` is unable to infer the value of an argument to ↵ | Claudiu Popa | 2018-07-19 | 1 | -1/+1 |
| | | | | | | `next()` Close #2316 | ||||
* | Don't emit `useless-return` when we have a single statement that is the ↵ | Claudiu Popa | 2018-07-17 | 1 | -2/+1 |
| | | | | | | | | | return itself We still want to be explicit when a function is supposed to return an optional value; even though `pass` could still work, it's not explicit enough and the function might look like it's missing an implementation. Close #2300 | ||||
* | Include the type of the next branch in `no-else-return` | Claudiu Popa | 2018-07-17 | 1 | -3/+7 |
| | | | | Close #2295 | ||||
* | Update copyright notices | Claudiu Popa | 2018-07-15 | 1 | -4/+10 |
| | |||||
* | Validate that the next() builtin is called when looking for ↵ | Claudiu Popa | 2018-07-15 | 1 | -0/+4 |
| | | | | stop-iteration-return, and ignore attributes named the same | ||||
* | `trailing-comma-tuple` can be emitted for `return` statements as well. | Claudiu Popa | 2018-07-10 | 1 | -1/+1 |
| | | | | Close #2269 | ||||
* | Infer the value of the truth_value before looking for consider-using-ternary ↵ | Claudiu Popa | 2018-07-08 | 1 | -3/+10 |
| | | | | | | | | | | and simplifiable-boolean-expression The reason for that is that a Name node, for instance, will not have a bool_value() implementation, thus it will default to returning Uninferable. In order to avoid that, just infer the object before verifying anything about it. Related to #2058 | ||||
* | Do not emit consider-using-ternary when all the elements involved are a ↵ | Claudiu Popa | 2018-07-08 | 1 | -0/+2 |
| | | | | Compare node (might not be simplifiable to a ternary). | ||||
* | Check Slice is type index (fix #2252) | Konstantin Manna | 2018-07-05 | 1 | -0/+1 |
| |