| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This is possible with python 3.6
|
| |
|
|\ |
|
| |\ |
|
| | |
| | |
| | |
| | | |
times the node has been visited. The push method return True depending on a condition of the number of visits.
|
| | | |
|
| |/
|/|
| |
| |
| |
| | |
(#804)
This also makes debugging a lot simpler reducing the complexity of the
function stack.
|
|/ |
|
|
|
|
|
|
| |
This reverts commit 8151853e9525252b75ae560273a709cbed47ddc5 which was added while investigating
the slowdown caused by context's path copying. Turns out this change doesn't have a negative
impact on the performance but it has a positive one on the inference.
|
|
|
|
|
|
|
|
| |
While copying the path solves some inference issues, it also leads to
horrenduous performance hits on large libraries such as pandas.
We still want to have the path copying, but we need a better understanding
on why that is needed, as well as a change on how we operate with the inference
contexts.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
mutated. Discovered during #588
|
|
|
|
|
|
|
|
|
| |
Add context_lookup to the context class as extra_context.
Deliver the correct context with the correct boundnode
for function argument nodes.
Close #177
|
|
|
|
|
| |
Code in multiple places had the same pattern
for infering call results.
|
|
|
| |
See https://github.com/PyCQA/pylint/pull/2209
|
| |
|
| |
|
|
|
|
| |
Copy inference path in inference context upon cloning to prevent diverging inference paths causing uninferable results
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
unusable to debug in a repl.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds __str__` and `__repr__` methods to InferenceContext and
alters the `__str__, `__repr__, and repr_tree() methods for NodeNG.
The `__str__` methods print out formatted information about the object's
fields; NodeNG's `__str__` method is not recursive. InferenceContext's
__repr__` gives a compact representation of its fields. I slightly
shortened NodeNG's `__repr__` method by removing a field that's usually
empty. I rewrote repr_tree() to better format the information it
contains and to display *all* the fields for each AST node, with some
fields controlled by options to avoid spam. I also fixed
https://bitbucket.org/logilab/astroid/issues/185/as_string-gives-wrong-result-for-keyword .
|
| |
| |
| |
| |
| |
| |
| |
| | |
This changeset introduces a better way to understand arguments
passed into call sites. The original logic was moved from
astroid.context.CallContext, which become only a container for
arguments and keyword arguments, to astroid.arguments.ArgumentInferator,
a new class for understanding arguments.
|
|/ |
|
|
|
|
|
|
|
| |
generator by doing an early return
This makes astroid compliant with PEP 479 changes, since in the future it will be
prohibited to exit from a generator by raising a StopIteration.
|
| |
|
|
In order to reduce circular dependencies between components,
CallContext is moved into a new module, astroid.context.
At the same time, for increasing the cohesion inside astroid.bases,
InferenceContext was moved as well into astroid.context.
|