| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Super objects in python have a __qualname__ attribute
so super nodes should have an equivalent qname method.
Prevents an error in upstream pylint
Close #533
|
|
|
|
| |
This reverts commit 06273cd07d4b3701998df7b2c656d1b029bdee8e.
|
|
|
|
| |
importing astroid.objects causes curcular imports with manager
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Major changes:
* AstroidError has an __init__ that accepts arbitrary keyword-only
arguments for adding information to exceptions, and a __str__ that
lazily uses exception attributes to generate a message. The first
positional argument to an exception is assigned to .message. The new
API should be fully backwards compatible in general.
* Some exceptions are combined or renamed; the old names are still
available.
* The OperationErrors used by pylint are now BadOperationMessages and
located in util.py.
* The AstroidBuildingException in _data_build stores the SyntaxError
in its .error attribute rather than args[0].
* Many places where exceptions are raised have new, hopefully more
useful error messages.
The only major issue remaining is how to propagate information into decorators.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
raised when there's a problem with any argument of the super call (invalid types).
|
|
|
|
| |
type.
|
|
|
|
| |
on the accessed object.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch also adds support for understanding super calls.
astroid understands the zero-argument form of super, specific to
Python 3, where the interpreter fills itself the arguments of the call. Also, we
are understanding the 2-argument form of super, both for bounded lookups
(super(X, instance)) as well as for unbounded lookups (super(X, Y)),
having as well support for validating that the object-or-type is a subtype
of the first argument. The unbounded form of super (one argument) is not
understood, since it's useless in practice and should be removed from
Python's specification. Closes issue #89.
|
|
Inference objects are similar with AST nodes, but they can be obtained
only after inference, so they can't be found inside the AST tree.
Their purpose is to handle at astroid level some operations which can't
be handled when using brain transforms. For instance, the first object
added is FrozenSet, which can be manipulated at astroid's level
(inferred, itered etc). Code such as this 'frozenset((1,2))'
will not return an Instance of frozenset, without having access to its
content, but a new objects.FrozenSet, which can be used just as a nodes.Set.
|