| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Close #3600
|
| |
|
| |
|
|
|
|
|
|
|
| |
We need to allow various third party libraries that depend on `pylint` to still use
`do_exit` until they can move over to `exit`.
Close #3590
|
| |
|
|
|
|
|
| |
This was a regressin in 2.5.
Close #3528
|
|
|
|
| |
Close #3524
|
|
|
|
| |
Close #3563
|
|
|
|
|
|
| |
This has been inadvertently changed several releases ago to ``do_exit``.
Close #3533
|
|
|
|
|
|
|
|
| |
The patch replaces `mro()` with `ancestors()` as the former is not
fully capable of generating the complete linearization when
dealing with ambiguous inferences.
Close #3527
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
operators
The original use case for this check was to catch old style type checking idioms
such as `type(x) is ...`, but it should not have been extended to handle `in` operators
as well.
Close #3337
|
|
|
|
| |
comprehension (#3494)
|
|
|
|
| |
return type annotation (#1976)
|
|
|
|
| |
decorator (#511)
|
|
|
|
|
|
|
| |
The JSON module already escapes special characters as needed.
This was already reported in #2769 and partially addressed by
6b1adc668727ebfbd84763b14b65676cc11febec, but that commit still quotes angle
brackets ('<' and '>').
|
|
|
|
|
|
| |
This has been handled on astroid's side with https://github.com/PyCQA/astroid/commit/2e1ba8eb47694439215b866564c4699039b86ec9
Close #3462
|
| |
|
|
|
|
|
|
|
|
|
| |
No message is emitted if the overriding function provides positional or
keyword variadics in its signature that can feasibly accept and pass on
all parameters given by the overridden function.
Closes #1482
Closes #1553
|
|
|
|
| |
Closes #3303
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
enabled / disabled
When everything else was disabled, except `unused-import`, pylint was emitting `unused-import`
even though the imports in questions were used.
The emission occurred due to the fact that disabling all the messages also disabled the calling
of `visit_name`, which deals with `undefined-variable`. This resulted in `visit_name` not marking
as consumed the earlier import as expected.
This fix still allows `visit_name` to be called, but the emission of `undefined-variable` and friends
is controlled via a flag prior to emission call site.
This is somewhat of a "temporary" hack, a better solution would be to separate the emission / checking
of undefined variable from marking the variables as consumed.
Close #3445
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`metaclass=ABCMeta` as abstract (#3446)
Related to #179 and #3098. Tweaks `utils.class_is_abstract` to not
depend purely on the presence of abstract methods, and instead also
return True for classes that either explicitly inherit from `abc.ABC`,
or explicitly define `abc.ABCMeta` as a metaclass.
This means that classes like:
class Foo(AbstractParent, ABC):
...
class Bar(AbstractParent, metaclass=ABCMeta):
...
no longer trigger W0223.
|
| |
|
|
|
|
|
|
|
| |
non-ascii-name check
Non-ASCII characters are now allowed by ``invalid-name`` check.
Also this commit adds a new check ``non-ascii-name``, which is used
to detect identifiers with non-ASCII characters.
|
|
|
|
| |
Close #3439
|
|
|
|
| |
Close #3433
|
|
|
|
| |
Close #2695
|
|
|
|
| |
Close #3090
|
|
|
| |
Signed-off-by: Gabriel R. Sezefredo <--global>
|
|
|
|
| |
Close #2410
|
|
|
| |
Close #3350
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(#3404)
The second argument to isinstance must be either a type or a tuple of types.
Close #3308
Co-authored-by: Claudiu Popa <pcmanticore@gmail.com>
|
|
|
|
|
|
|
| |
This commit adds a new `notes-rgx` which is used by the "fixme" check for more
granular control over the what fixme messages to emit.
Co-authored-by: Claudiu Popa <pcmanticore@gmail.com>
|
|
|
| |
Close #3355
|
|
|
|
|
|
|
|
| |
``python -m pylint ...`` adds the current working directory as the first element
of ``sys.path``. This opens up a potential security hole where ``pylint`` will import
user level code as long as that code resides in modules having the same name as stdlib
or pylint's own modules.
Close #3386
|
| |
|
|
|
|
|
|
| |
`redeclared-assigned-name` now uses `dummy-variables-rgx` to ignore
the variables that match the pattern.
Close #3341
|
|
|
|
|
| |
list before raising an exception. (#3385)
Close #3246
|
|
|
|
|
| |
check for nested statements. (#3374)
Previously, the broad_try_except extension did not check nested statements. For example, an if/else statement and its body inside of a try clause did not result in a message. Now, the extension checks within sub-nodes (i.e., if, for, while, and with) and counts their statements too. Also, the extension also checks try/finally statements now.
|
|
|
|
|
|
|
|
|
|
| |
While playing around with the 'import-graph' setting, I noticed that attempting to write a graph to a local directory did not work as I would have expected.
For example, 'import-graph=docs/graph.dot' would attempt to add 'graph.dot' to '/LOCAL/PATH/docs/docs/'.
This was because the 'dot_sourcepath' in this scenario would be set to the combination of the 'storedir' ('/LOCAL/PATH/docs') and the 'outputfile' ('docs/graph.dot'). I am requesting that it be changed to just be 'outputfile' in this scenario.
Also, I have removed the instantiation of the 'dotfile' variable because it now has no use
Co-authored-by: Claudiu Popa <pcmanticore@gmail.com>
|
|
|
|
|
|
|
| |
3.5.3 or lower) (#3380)
Type hint updated as well along with importing typing module to satisfy type checking.
|
|
|
|
|
|
|
| |
This check is emitted whenever **pylint** finds an assert statement
with a string literal as its first argument. Such assert statements
are probably unintended as they will always pass.
Close #3284
|
|
|
|
| |
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
While dict-keys-not-iterating does not generate false positives for the
'in' containment test, the check does generate false positives for the
inverse counterpart of the containment test, 'not in'. This patch
changes the check behavior to also consider the 'not in' operator as an
iterating context.
* Relates to #2186
Signed-off-by: Athos Ribeiro <athoscr@fedoraproject.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Quoting PEP-8:
In Python, single-quoted strings and double-quoted strings are the same. This PEP does not make a recommendation for this. Pick a rule and stick to it. When a string contains single or double quote characters, however, use the other one to avoid backslashes in the string. It improves readability.
For triple-quoted strings, always use double quote characters to be consistent with the docstring convention in PEP 257.
Features:
Accounts for strings where the delimiter is swapped so an internal quote doesn't need to be escaped
Only errors on those lines that represent the module's minority delimiter.
Ignores longstrings (they could be docstrings, and checking those delimiters is someone else's responsibility)
|
|
|
|
|
|
| |
metaclass via an attribute
Closes #1603
|
|
|
| |
Close #583
|
| |
|