| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This prevents a crash which can occur when an object doesn't have
.qname() method after the inference.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with the same name as the package itself.
The problem was partially the fault of astroid.modutils.get_module_part,
in combination with a given context file.
The function returned 'dummy' as the module part for the string
`dummy.dummy.Dummy`, which is in fact true, since the first dummy
is the package and the second dummy is the module from where Dummy
gets loaded. But get_module_part has no way to know this semantic
inference, that the second dummy is a relative import inside the
first one. As such, it's better to just skip the check if the
condition of being relative inside a __init__.py file is found,
since there's no way to load itself in that case.
Closes issues #708 and #706.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
in plugin modules.
If a plugin uses an old visit method (visit_class for instance), this can lead
to a crash in pylint's base checkers, because the logic in the PylintASTWalker
assumes that all checkers have a visit_class / leave_class method. The
patch fixes this by looking for both names.
Closes issue #711.
|
|
|
|
|
| |
It is emitted when item deletion is tried on an object which doesn't
have this ability. Closes issue #592.
|
|
|
|
|
| |
This is emitted when item assignment is tried on an object which doesn't
have this ability. Closes issue #591.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is used when an if statement could be reduced to a boolean evaluation
of its test, as seen in this example:
if some_cond:
return True
else:
return False
could be reduced to `return bool(some_cond)`
Closes issue #698.
|
|
|
|
|
|
|
| |
--max-bool-expr option allows to configure it (by default, up to 5 are
tolerated)
closes issue #677
|
|\ |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Fixes issue #561.
|
| | |
|
| |
| |
| |
| |
| |
| | |
The message is emitted when code that uses `range` and `len` for iterating is
encountered, which can be easily simplified by using `enumerate` instead.
This makes the code a bit faster and cleaner. Closes issue #684.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Errors fixed:
- unqouted emphasis character usage (*)
- missing list index
Fixes #481.
|
| |
| |
| |
| | |
issue #627.
|
| |
| |
| |
| | |
Closes issue #632.
|
| |
| |
| |
| | |
Closes issue #679.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Idea of checking is very simple: value used to the right of the 'in' operator
should support membership test protocol (i.e. define either __contains__ or
__iter__ or __getitem__).
Fixes issue #589.
|
|\ \ |
|
| | | |
|
|\ \ \
| |_|/
|/| |
| | | |
Make `no-self-use` checker not throw a warning if method has a `super()` call.
|
| |/ |
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
multiple times into a function call.
This is similar with redundant-keyword-arg, but it's mildly different
that it needs to be a separate error. This change also uses a CallSite for
understanding the arguments that were passed into a function call, since
with this we can make sense about multiple starred arguments passed into
(PEP 448).
|
| |
|
| |
|
|
|
|
| |
Fixes issue #598. Had to modify some functional tests to ignore new message.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* this patch adds the basis of a new checker, 'async', which deals
with problems that can occur when working with async features added
in Python with PEP 492.
* We're also adding a new error, 'yield-inside-async-function', emitted on
Python 3.5 and upwards when the `yield` statement is found inside
a new coroutine function (PEP 492).
* Another new error is added, 'not-async-context-manager', emitted when
an async context manager block is used with an object which doesn't
support this protocol (PEP 492).
|
|
|
|
|
| |
This fixes a false positive related to abstract-class-instantiated.
Closes issue #648.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Using abbreviations for CLI options was never considered to be
a feature of pylint, this fact being only a side effect of using optparse.
As this was the case, using --load-plugin or other abbreviation
for --load-plugins never actually worked, while it also didn't raise
an error. Closes issue #424.
|
|
|
|
| |
Closes issue #639.
|
|
|
|
|
|
|
|
| |
With this change, we moved away from depending on logilab-common,
having in Pylint all the components that were used from logilab-common.
The API should be considered an implementation detail and can change at
some point in the future.
Closes issue #621.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The error is used when a bare raise is not used inside a try suite.
This can generate a RuntimeError in Python, if there are no active exceptions
to be reraised. While it works in Python 2 due to the fact that the exception
leaks outside of the except block, it's nevertheless a behaviour that
an user shouldn't depend upon, since it's not obvious to the reader of the code
what exception will be raised and it will not be compatible with Python 3 anyhow.
Closes issue #633.
|
| |
|
| |
|
|
|
|
|
|
|
| |
The reason behind this is that this kind of errors should be
detected by the type checker for *all* the builtins and not
as a special case for the reversed builtin. This will happen
shortly in the future.
|
|
|
|
| |
required-attributes, is slated for removal in Pylint 1.6.
|
|
|
|
|
|
|
|
| |
The reason behind this removal is the fact that it's a specialized
flag and there are solutions for the original problem:
use --generated-members with the members that causes problems
when using Zope or add AST transforms tailored to the zope
project. Closes issue #570.
|
|
|
|
|
| |
The error is emitted when the `continue` keyword is found
inside a `finally` clause, which is a SyntaxError.
|
| |
|