summaryrefslogtreecommitdiff
path: root/astroid/scoped_nodes.py
Commit message (Collapse)AuthorAgeFilesLines
* Move node_classes and scoped_nodes into the tree namespace.Claudiu Popa2015-11-011-1746/+0
|
* Separate runtime objects from ASTsClaudiu Popa2015-11-011-22/+22
| | | | | | | The runtime objects from astroid.bases and astroid.objects got merged together into astroid.runtime.objects. bases._infer_stmts was moved into a new namespace, interpreter, which should be the starting point of a the new abstract interpretation component.
* Start splitting AST from runtime objectsClaudiu Popa2015-11-011-12/+13
| | | | | | There are two new directories now, runtime and tree, which are meant to separate between runtime objects, such as Instance, BoundMethod etc from AST nodes.
* Add the concept of virtual basesClaudiu Popa2015-10-311-0/+10
| | | | | | | This commit introduces the concept of virtual bases for the AST and runtime objects, the idea being that isinstance checks should be done against these virtual classes, while other operations need to be done on concrete objects.
* Class.getattr('__mro__') returns the actual MRO.Claudiu Popa2015-10-261-6/+8
| | | | | | | | Also, Class.getattr('__bases__') returns actual bases. It previously didn't work correctly, because it was putting the entire ancestors into the Tuple object and it put those classes into the wrong attribute. Closes issue #128.
* Move proxy_alias function to util.pyClaudiu Popa2015-10-111-3/+3
|
* Remove doctype and future imports which aren't useful.Claudiu Popa2015-10-111-2/+0
|
* Move bases.NodeNG and bases.Statement in node_classesClaudiu Popa2015-10-111-4/+6
| | | | | | We're doing this in order to reduce the dependency hell which occurs when a module such as bases.py wants to use classes defined in node_classes.
* Fix a crash which occurred when extra_decorators was considering non-class ↵Claudiu Popa2015-09-291-1/+4
| | | | level assignments to the same name as decorator calls.
* Merged in ceridwenv/astroid (pull request #88)Claudiu Popa2015-09-261-7/+5
|\ | | | | | | Use six.reraise to avoid losing tracebacks for simple cases
| * Add helper function for reraising exceptionsCeridwen2015-09-211-13/+4
| |
| * Use six.reraise to avoid losing tracebacks for simple casesCeridwen2015-09-211-7/+14
| |
* | Allow only classes to be looked up in the metaclass chain for searching for ↵Claudiu Popa2015-09-221-1/+1
|/ | | | an attribute.
* Final draft of state printing after mergeCeridwen2015-09-131-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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 .
| * First pass of the Python 3.5 support.Claudiu Popa2015-09-071-0/+4
| |
* | Final draft of improved state printingCeridwen2015-09-131-6/+4
| |
* | First draft of improved state printingCeridwen2015-09-091-7/+10
|/
* Merged in ceridwenv/astroid (pull request #86)Claudiu Popa2015-08-261-9/+7
|\ | | | | | | Improve decorator introspection using wrapt and functools.wraps.
| * Improve decorator introspection using wrapt and functools.wrapsCeridwen2015-08-261-9/+7
| |
* | Make seen a parameter with a default value, instead of passing explicitly None.Claudiu Popa2015-08-261-2/+2
| |
* | Merged in renezhang/astroid_metaclass_loop (pull request #85)Claudiu Popa2015-08-261-7/+15
|\ \ | |/ |/| | | Fix infinite loop in metaclass inference
| * Add new _find_metaclass method to maintain signature of metaclassRene Zhang2015-08-261-8/+11
| |
| * Fix infinite loop in metaclass inferenceRene Zhang2015-08-201-4/+9
| |
* | Change the order of the mixins, so that mixins are the first in the MRO ↵Claudiu Popa2015-08-251-2/+2
| | | | | | | | before the actual roots.
* | Fix pylint issues.Claudiu Popa2015-08-251-3/+2
| |
* | Use the old display types, since they are used by pylint to generate error ↵Claudiu Popa2015-08-221-2/+2
| | | | | | | | messages.
* | Remove debug statementsCeridwen2015-08-211-1/+0
| |
* | Add tests for aliasesCeridwen2015-08-211-8/+10
| |
* | More fixes for bugs introduced during mergeCeridwen2015-08-181-17/+24
| |
* | More code review fixesCeridwen2015-08-151-18/+3
| |
* | Fix most obvious errors intorduced by the latest mergeCeridwen2015-08-141-8/+2
| |
* | Merge main into defaultCeridwen2015-08-141-93/+201
|\ \ | |/
| * Move InferenceContext and CallContext into astroid.contextClaudiu Popa2015-08-121-5/+6
| | | | | | | | | | | | | | 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.
| * Remove unused imports.Claudiu Popa2015-08-111-1/+0
| |
| * Drop code that inspects sys.modules unconditionally, since it breaks the ↵Claudiu Popa2015-08-091-13/+0
| | | | | | | | expectancy of a static analysis tool.
| * Remove dead code.Claudiu Popa2015-08-091-1/+0
| |
| * Move YES to astroid.util.Claudiu Popa2015-08-091-14/+15
| | | | | | | | | | | | | | YES is needed by other components of astroid, components which aren't necessarily related to astroid.bases. In order to reduce circular interdependencies between components, YES is moved into a new module, tailored for various *utilities*.
| * Remove trailing whitespaces.Claudiu Popa2015-08-061-3/+3
| |
| * Move the determination of extra_decorators directly into Function, as ↵Claudiu Popa2015-08-061-2/+42
| | | | | | | | | | | | | | | | | | | | Function.extra_decorators. Previously, the extra_decorators computation was done in the rebuilder, which isn't the proper way to do it, since the rebuilder should be responsible only from transforming vanilla ast trees to astroid trees. Now, Function exports a propery called `extra_decorators`, which computes at runtime the callables that are wrapping a function in a class scope.
| * Move the determination of a function type from rebuilder to Function.type.Claudiu Popa2015-08-061-46/+53
| | | | | | | | Closes issue #162.
| * Class._explicit_metaclass is now a public API, in the form of ↵Claudiu Popa2015-08-041-7/+6
| | | | | | | | | | | | | | | | Class.declared_metaclass. Class.mro remains the de facto method for retrieving the metaclass of a class, which will also do an evaluation of what declared_metaclass returns.
| * Remove trailing whitespace.Claudiu Popa2015-07-261-1/+1
| |
| * Class.getattr looks by default in the implicit and the explicit metaclasses, ↵Claudiu Popa2015-07-261-4/+55
| | | | | | | | | | | | which is `type` on Python 3. Closes issue #114.
| * Add get_wrapping_class API to scoped_nodes, which can be used to retrieve ↵Claudiu Popa2015-07-261-0/+17
| | | | | | | | the class that wraps a node.
| * Get rid of astroid.common.decorators.Florian Bruhin2015-07-251-1/+1
| | | | | | | | | | | | | | | | This also implements an easier @cache decorator and removes @classproperty as it only was used in an insignificant test. --HG-- branch : no-logilab-common
* | Move proxies to nodes.py and scoped_nodes.pyCeridwen2015-07-131-7/+4
| |
* | Fix code review comments.Ceridwen2015-07-131-4/+4
| | | | | | | | | | | | | | | | Added aliases for inferred() and assign_type(), refactor some uses of ternary if, remove some now-unused internal functions in rebuilder, replaced the mutating docstring function with one that returns values as well as side-effects, change back to lazy-object-proxy, and add keyword args to the Module call in rebuilder.
* | Fix isinstance/proxy bug by changing from lazy-object-proxy to wrapt and ↵Ceridwen2015-07-111-0/+9
| | | | | | | | minor fixes
* | Merge logilab/astroid againCeridwen2015-07-111-1/+1
|\ \ | |/
* | Fix bugs introduced by merge and formattingCeridwen2015-07-111-4/+6
| |