| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Close PyCQA/pylint#3686
|
| |
|
|
|
|
| |
Close PyCQA/pylint#3519
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This container is used to store values that have already been evaluated.
For instance, 79d5a3a783cf0b5a729e4e467508e955a0cca55f added support
for inferring `tuple()` call arguments, but as a result, the `elts` of a `Tuple`
can be objects not *references*. As a result, `Tuple.elts` can contain class objects
rather than references (names) to class object. The `EvaluatedObject` helps with that,
as we still have to call `.infer()` (albeit a no-op) to grab the inferred value of an element.
|
|
|
|
|
|
|
|
|
| |
We need to pass an inference context downstream when inferring the boolean
value of a node in order to prevent recursion errors and double inference.
This fix prevents a recursion error with dask library.
Close PyCQA/pylint#2985
|
| |
|
| |
|
|
|
|
|
|
|
| |
Because ``Const.itered`` was not returning proper nodes, pylint was failing
when trying to infer objects created from those nodes.
Close PyCQA/pylint#3306
|
| |
|
|
|
|
|
|
|
| |
Until now they had as parent the builtin `ast` node which meant
we were operating with primitive objects instead of our own.
Close PyCQA/pylint#3174
|
|
|
|
|
|
| |
The NodeNG.nearest method was not working properly as outlined in #691
and seem to not be in use at all across astroid and pylint.
Close #691
|
| |
|
|
|
|
| |
keywords arguments
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
annotations
The annotations were stored until now in `.annotations` and `kwonlyargs_annotations`,
but given the addition of `posonlyargs`, we need to store the positional only
annotations somewhere else as well. This new attribute should simplify the handling
of annotations for both positional only and positional or keyword parameters.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
expressions.
Close #674
|
| |
|
|
|
| |
Close #665
|
|
|
|
|
|
|
|
|
|
|
| |
and ``dict``
We were properly inferring these callables *only* if they had consts as
values, but that is not the case most of the time. Instead we try to infer
the values that their arguments can be and use them instead of assuming
Const nodes all the time.
Close PyCQA/pylint#2841
|
|
|
|
| |
them in a dict
|
|
|
|
|
|
| |
handler.
Close PyCQA/pylint#2777
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
class for PartialFunction
In the case where the node is a PartialFunction and its name is the same as the current statement's name,
avoid the statement deletion.
The problem was that a call to a function that has been previously called vit a functools.partial was wrongly inferred.
The bug comes from the _filter_stmts method of the LookupMixin class. The deletion of the current statement should not be
made in the case where the node is an instance of the PartialFunction class and if the node's name is the same as the statement's name.
This change also extracts PartialFunction from brain_functools into astroid.objects so that we remove a circular import problem.
Close PyCQA/pylint#2588
|
| |
|
|
|
|
| |
Reformat a chained comparison so that no more 'chained-comparison' warning is emitted from node_classe.py
|
|
|
|
|
|
|
|
| |
The result is usually static, but we're hitting this function quite
a lot for big projects such as pandas. This change is a matter of compromising
between the amount of memory astroid needs for analysis (e.g. storing the
results in memory) vs the wasted CPU time in calling the same
function over and over.
|
| |
|
| |
|
|
|
|
| |
Close PyCQA/pylint#2400
|
|
|
|
| |
The explicit StopIterations were themselves were cut in ceeee097.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This would introduce a new method of configuring astroid & pylint, while the
usual approach we used so far was to set a flag in the MANAGER itself it we'd
need to customize some behaviour (extension_package_whitelist and friends).
Also renamed the flag to `max_inferable_values` to be more suggestive on what it does.
|
|
|
|
|
|
|
|
|
|
| |
spot performance issues.
Add new envrionment variable call ASTROID_MAX_INFERABLE to tune
the max inferable amount of values at a time.
Close #579
Close PyCQA/pylint#2251
|
|
|
|
|
|
|
|
|
| |
Add context_lookup to the context class as extra_context.
Deliver the correct context with the correct boundnode
for function argument nodes.
Close #177
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The precedence and associativity rules of operators are respected
and parens are only wrapped around child nodes when needed
A single If node inside the else block is output as `elif`
Unneccesary parens in with statements are removed
Unneccesary parens in tuple returns are removed
Doc strings in classes and functions no longer get additional indenting
|
|
|
|
| |
This was overlooked in the initial implementation of
_multi_line_block_fields.
|
|
|
| |
See https://github.com/PyCQA/pylint/pull/2209
|
|
|
|
|
|
|
|
|
|
|
|
| |
Calling object.__new__ on a Const node would result in infinite recursion
Fix infinite recursion by explicitly raising AttributeError if
__getattr__ is called for value
See https://nedbatchelder.com/blog/201010/surprising_getattr_recursion.html
for more details
Close #565
|
|
|
|
|
|
|
|
| |
Stop issue where decorators with the same name as the decorated function would cause an infinite loop
This infinite recursion was caused by an oversight in name lookup which prefferred methods even if they weren't defined yet
Close #375
|
| |
|
| |
|