| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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 "").
|
|
|
|
|
|
|
| |
Closes #1422
Closes #2019
This fixes #1422 and fixes #2019.
|
| |
|
|
|
|
|
|
| |
Don't suggest enumerate when defining `__iter__` and operating on the underlying class
Closes #2477
|
|
|
|
|
|
| |
Similar to simplifiable-if-statement, it finds trivial ternary
statements and suggested replacing them.
Paired-with: Richard Goodman <richardg@brandwatch.com>
|
|
|
| |
Fix grammar error in pylintrc files and CONTRIBUTORS.txt.
|
|
|
|
| |
Close #2453
|
| |
|
|
|
|
|
| |
This looks like an oversight in the graph adding code. '*' was
explicitly checked for, but nothing was done on '*' imports.
|
| |
|
|
|
|
|
|
|
|
|
| |
Currently the function `checkers.utils.is_subclass_of()` is raising a
`NoneType object has no attribute name` exception when only one of the
arguments (nodes) is `None`.
This change fix that updating the function to make sure all params are
an instance of `astroid.ClassDef` before the proper check
|
|
|
|
|
|
|
|
| |
The Removed Python 2 specific checks are: deprecated-lambda, nonstandard-exception,
lowercase-l-suffix, slots-on-old-class, super-on-old-class, property-on-old-class,
old-style-class.
Close #1896
|
| |
|
| |
|
|
|
|
|
|
| |
This changes the `try-accept-raise` message from `E0705` to `W0706` to
be more in line with the way the rest of the messages are organized.
Fixes #2323
|
|
|
| |
Close #2047
|
| |
|
|
|
|
| |
Close #2177
|
|
|
|
|
|
|
| |
Add new checker "chained-comparison" which is used when pylint
can detect that multiple comparisons can be squashed together
into one.
Close #2032
|
|
|
|
| |
This check warn for comparison with bare callable, without calling it.
|
|
|
|
|
|
|
|
|
| |
This patch adds lints for two more cases:
1) `if len(X) < 1:`
2) `if len(X) <= 0:`
Meaning of the both is same as `if not X`.
Signed-off-by: Matej Marusak <mmarusak@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
Given an import, we'll emit this error whenever pylint finds an alias
with the same name as the import module.
Close #2052.
|
|
|
| |
Close #2083
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new command-line option for the use of continuous integration
scripts which abort if a command returns a non-zero status code. If the
option is specified, and Pylint runs successfully, it will exit with 0
regardless of the number of lint issues detected.
Configuration errors, parse errors, and calling Pylint with invalid
command-line options all still return a non-zero error code, even if
`--exit-zero` is specified.
Thanks for hosting a sprint at PyCon 2018!
Close #2042
|
|
|
|
|
|
| |
Nested scopes don't reset reset the `too-many-statements` check
state.
Close #1978
|
|
|
|
| |
default
|
|
|
|
| |
documenting a NotImplementedError.
|
|
|
|
|
|
|
|
| |
A new check `logging-fstring-interpolation` is added.
It emits a warning when f-string is used within logging
function calls.
Fixes https://github.com/PyCQA/pylint/issues/1998
|
|
|
|
|
|
|
| |
This test checks that we don't compare a value with itself,
which might suggest some potential bug or an honest mistake.
Fixes #2051
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default report format in mypy, pydocstyle, and other tools includes the file path so that the user of certain terminals (e.g. iTerm) can click on each warning to open that line in their editor.
For example, here is what the default mypy output looks like:
framework/views/billing.py:92: error: Incompatible return value type (got "View", expected
"DashboardTab")
With this new format, pylintoutput looks like:
framework/views/dashboards.py:21:8: W0612: Unused variable 'x' (unused-variable)
Note that some editors (e.g. Sublime Text) index columns from 1, so this will place the cursor one column to the left of the warning.
|
|
|
|
|
|
|
| |
This commit does two things:
* Change `it's name should` to `its name should`
* Update CONTRIBUTORS.txt
Thanks for holding a sprint at PyCon!
|
|
|
| |
Close #1195
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Numpydoc specification allows for optional return value name in the form
of:
```
Returns
-------
name : type
Some description
```
These were not being honored by the current regex for return lines. This
adds an optional, non-capturing group to the regex which accounts for
the `name : ` bit.
Fixes #2030
|
|
|
|
|
|
| |
Inner functions don't need to be documented, as they are not part of a public API.
Fixes PyCQA/pylint#1956
|
|
|
|
|
|
|
|
| |
reports on except handlers where raise is the first operator
in the handler body. Reports on either bare raise or when we're
raising the same type of exception as the one that is being
handled.
Update existing tests to ignore the new error condition.
|
| |
|
| |
|
| |
|
|
|
|
| |
Closes #1120
|
| |
|
| |
|
|
|
|
|
| |
warns about a single "return" or "return None" statement at the
end of functions or methods
|
| |
|
| |
|
|
|
| |
Close #1774
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shallow copy of os.environ doesn't work as people may expect. os.environ
is not a dict object but rather a proxy object, so any changes made
on the copy may have unexpected effects on os.environ
Instead of copy.copy(os.environ) method os.environ.copy() should be
used.
Message id is: `shallow-copy-environ`
See https://bugs.python.org/issue15373 for details.
Resolves: #1301
|
| |
|