summaryrefslogtreecommitdiff
path: root/astroid/tests/unittest_objects.py
Commit message (Collapse)AuthorAgeFilesLines
* Moved tests out of package directory (#704)Ashley Whetter2019-10-151-556/+0
|
* Initial formatting of astroidClaudiu Popa2018-10-021-109/+144
|
* Update the copyright noticesastroid-2.0Claudiu Popa2018-07-151-1/+2
|
* Add qname method to Super objectsBryce Guinta2018-04-191-0/+13
| | | | | | | | | 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
* Revert "Move FrozenSet to node_classes so it is accessible"Bryce Guinta2018-03-111-1/+1
| | | | This reverts commit 06273cd07d4b3701998df7b2c656d1b029bdee8e.
* Move FrozenSet to node_classes so it is accessibleBryce Guinta2018-03-111-1/+1
| | | | importing astroid.objects causes curcular imports with manager
* Even more granular copyrights (thanks to copyrite)Claudiu Popa2016-07-221-2/+3
|
* Keep a consistent copyright notice across the board.Claudiu Popa2016-07-191-0/+2
|
* New function, astroid.extract_node, exported out from astroid.test_utils.Claudiu Popa2016-06-291-19/+20
|
* Convert all files to new license headerCeridwen2016-05-161-517/+503
|
* Support accessing properties using super().Claudiu Popa2016-01-141-0/+18
|
* This bookmark adds structured exceptions to astroid.Ceridwen2015-11-021-10/+10
| | | | | | | | | | | | | | | | | | | 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.
* Remove doctype and future imports which aren't useful.Claudiu Popa2015-10-111-2/+0
|
* More fixes for bugs introduced during mergeCeridwen2015-08-181-2/+0
|
* Convert line endings for some files back to DOSCeridwen2015-08-151-503/+503
|
* Fix issues found in code reviewCeridwen2015-08-141-0/+4
|
* Node constructors almost finished except for two bugsCeridwen2015-07-081-485/+483
|
* Staticmethods retrieved with super are functions, not bound methods.Claudiu Popa2015-06-151-0/+6
|
* Add a new SuperError exception subclass, SuperArgumentTypeError, which is ↵Claudiu Popa2015-05-291-2/+4
| | | | raised when there's a problem with any argument of the super call (invalid types).
* Fail when calling Super.super_mro if the object-or-type is not the expected ↵Claudiu Popa2015-05-291-0/+11
| | | | type.
* Update the rules for what descriptor is returned from a super(), depending ↵Claudiu Popa2015-05-281-6/+59
| | | | on the accessed object.
* Add a new *inference object* called SuperClaudiu Popa2015-05-281-0/+380
| | | | | | | | | | | | 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.
* Add a new type of nodes, called *inference objects*.Claudiu Popa2015-05-191-0/+49
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.