Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Move all astroid modules into a its own directory, which is now the package. | Torsten Marek | 2014-11-08 | 1 | -1304/+0 |
| | | | | python setup.py develop now works. | ||||
* | Use keyword arguments to improve clarity. | Claudiu Popa | 2014-11-04 | 1 | -1/+2 |
| | |||||
* | Some parts of the comments weren't true anymore. | Claudiu Popa | 2014-11-04 | 1 | -2/+1 |
| | |||||
* | Extend the inference of __all__ elements in wildcard_import_names. | Claudiu Popa | 2014-10-28 | 1 | -1/+6 |
| | |||||
* | Module.wildcard_import_names tries to infer non-const entries from __all__. | Claudiu Popa | 2014-10-28 | 1 | -9/+23 |
| | |||||
* | Make the source compatible with Python 2.7 and 3.3+. | Claudiu Popa | 2014-10-27 | 1 | -16/+14 |
| | |||||
* | Various speed improvements. | Claudiu Popa | 2014-10-20 | 1 | -46/+52 |
|\ | | | | | | | Patch by Alex Munroe. | ||||
| * | merged with default | Eevee (Alex Munroe) | 2014-07-31 | 1 | -11/+145 |
| |\ | |||||
| * | | Fix some deep recursion problems. | Eevee (Alex Munroe) | 2014-07-02 | 1 | -22/+21 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They used to be avoided by returning generators in a few places rather than re-yielding, but I broke that with the context managers. Oops. So: - context.push now returns a new context, which should just be passed into the child generator instead of the original context. This solves the awkward problem of returning a generator from within a `with` block, where the block will end before the generator is actually evaluated. - The inference cache no longer eagerly evaluates whatever's being cached; instead it wraps the original generator in a new one that only caches the results once it's done. | ||||
| * | | Miscellaneous node rebuilder microoptimizations. | Eevee (Alex Munroe) | 2014-07-01 | 1 | -3/+6 |
| | | | |||||
| * | | Speed up rebuilder considerably by computing line numbers lazily. | Eevee (Alex Munroe) | 2014-07-01 | 1 | -14/+18 |
| | | | | | | | | | | | | | | | | | | | | | Fetching the last child of each of hundreds of thousands of nodes is relatively expensive, and most of the time this information is never used, so don't actually figure it out until it's asked for. Saves the overhead of quite a few function calls, too. | ||||
| * | | Remove context.lookupname; make it an argument to infer() when appropriate. | Eevee (Alex Munroe) | 2014-07-01 | 1 | -24/+21 |
| | | | |||||
| * | | Replace copy_context with some dynamic scoping. | Eevee (Alex Munroe) | 2014-07-01 | 1 | -26/+29 |
| | | | |||||
* | | | Fix an infinite loop with decorator call chain inference, where the ↵ | Claudiu Popa | 2014-10-16 | 1 | -0/+4 |
| | | | | | | | | | | | | decorator returns itself. Closes issue #50. | ||||
* | | | Guard against infinite recursion in _is_metaclass. | Torsten Marek | 2014-08-22 | 1 | -2/+8 |
| | | | | | | | | | | | | | | | Unfortunately, I wasn't able to boil this down to a small-enough reproduction case, since the case that I had depended on conditional imports. | ||||
* | | | Fix an infinite loop in the inference, by returning a copy of instance ↵ | Claudiu Popa | 2014-08-20 | 1 | -1/+3 |
| |/ |/| | | | | | attributes, when calling 'instance_attr'. Closes issue #34 (patch by Emile Anclin). | ||||
* | | Fix a crash occurred when inferring decorator call chain. Closes issue #42. | Claudiu Popa | 2014-07-28 | 1 | -1/+1 |
| | | |||||
* | | pylint source code | Sylvain Thénault | 2014-07-25 | 1 | -14/+13 |
| | | |||||
* | | Return YES if the bases cannot be inferred for a metaclass invocation, until ↵ | Torsten Marek | 2014-07-25 | 1 | -1/+5 |
| | | | | | | | | we have an unknown AST node. | ||||
* | | Function nodes can detect decorator call chain and see if they are decorated ↵ | Claudiu Popa | 2014-07-24 | 1 | -1/+50 |
| | | | | | | | | with builtin descriptors (`classmethod` and `staticmethod`). | ||||
* | | Return new classes when inferring calls to type(name, bases, ns) and its ↵ | Torsten Marek | 2014-07-24 | 1 | -1/+24 |
| | | | | | | | | subtypes. | ||||
* | | Expose function annotation to astroid. `Arguments` node exposes ↵ | Claudiu Popa | 2014-07-13 | 1 | -1/+6 |
| | | | | | | | | 'varargannotation', 'kwargannotation' and 'annotations' attributes, while `Function` node has the 'returns' attribute. | ||||
* | | Make islots private. | Claudiu Popa | 2014-07-03 | 1 | -2/+4 |
| | | | | | | | | | | --HG-- branch : slots | ||||
* | | Merge with default. | Claudiu Popa | 2014-07-03 | 1 | -8/+25 |
|\ \ | |/ | | | | | | | --HG-- branch : slots | ||||
| * | Stop looking at the __metaclass__ class attribute for python3 | Julien Cristau | 2014-06-30 | 1 | -4/+7 |
| | | | | | | | | Python 3 only considers the `metaclass` keyword argument. | ||||
| * | Handle __metaclass__ defined at the module level | Julien Cristau | 2014-06-10 | 1 | -9/+23 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the doc (https://docs.python.org/2/reference/datamodel.html#customizing-class-creation): The appropriate metaclass is determined by the following precedence rules: - If dict['__metaclass__'] exists, it is used. - Otherwise, if there is at least one base class, its metaclass is used (this looks for a __class__ attribute first and if not found, uses its type). - Otherwise, if a global variable named __metaclass__ exists, it is used. - Otherwise, the old-style, classic metaclass (types.ClassType) is used. The third case was not handled by node.metaclass(). Remove metaclass lookup from the rebuilder, handle it all in Class._explicit_metaclass() instead, and use that in _newstyle_impl if possible. Remove test_newstyle_and_metaclass_bad, as I think the returned value in this test is irrelevant (it's a TypeError anyway, so you can't actually build that class), and replace it with a test using nested classes. Closes issue#33 | ||||
* | | Add `slots` and `islots` methods to Class nodes. | Claudiu Popa | 2014-06-04 | 1 | -2/+54 |
|/ | | | | | --HG-- branch : slots | ||||
* | Function nodes can detect if they are decorated with subclasses of builtin ↵ | Claudiu Popa | 2014-05-07 | 1 | -2/+32 |
| | | | | | | | descriptors when determining their type (`classmethod` and `staticmethod`). --HG-- branch : classmethod_subclasses | ||||
* | Simplify the lookup for the metaclass; add comments for the YES node tests. | Claudiu Popa | 2014-04-30 | 1 | -6/+4 |
| | | | | | --HG-- branch : ancestors | ||||
* | Merge with default. | Claudiu Popa | 2014-04-29 | 1 | -0/+4 |
|\ | | | | | | | | | --HG-- branch : ancestors | ||||
| * | Add future imports to Module.future_imports. | Torsten Marek | 2014-04-25 | 1 | -0/+4 |
| | | |||||
* | | Look in ancestors when a class node doesn't use an explicitly defined ↵ | Claudiu Popa | 2014-04-25 | 1 | -4/+29 |
|/ | | | | metaclass (the metaclass of a class is a metaclass for all its subclasses). | ||||
* | Skip non-class bases. | Claudiu Popa | 2014-04-24 | 1 | -0/+2 |
| | |||||
* | Skip the same infered nodes as the base class in _is_metaclass. Closes issue ↵ | Claudiu Popa | 2014-04-22 | 1 | -0/+2 |
| | | | | | | | #25. --HG-- branch : ancestors | ||||
* | Add note in test regarding the .ancestors() fix. Check the _type of a base ↵ | Claudiu Popa | 2014-04-15 | 1 | -0/+2 |
| | | | | | | | class before calling _is_metaclass again. --HG-- branch : ancestors | ||||
* | Unwrap instances found in `.ancestors()`, by using their _proxied class. ↵ | Claudiu Popa | 2014-04-12 | 1 | -6/+36 |
| | | | | | | | Don't inherit the metaclass status if the current class can't be a metaclass. --HG-- branch : ancestors | ||||
* | Merged logilab/astroid into default | Claudiu Popa | 2014-04-02 | 1 | -0/+8 |
|\ | |||||
| * | Merged in flyingsheep/astroid (pull request #15) | Sylvain Thénault | 2014-03-26 | 1 | -0/+8 |
| |\ | | | | | | | | | | AstroidBuilder.string_build was incompatible with file_stream | ||||
| | * | fixed python 2 compatibility for BytesIO | Phil Schaf | 2013-11-25 | 1 | -1/+4 |
| | | | |||||
| | * | added file_bytes to Module to allow file_stream to be retrieved from it | Phil Schaf | 2013-11-24 | 1 | -0/+5 |
| | | | |||||
* | | | Do not print the traceback for SyntaxErrors. | Claudiu Popa | 2014-04-02 | 1 | -0/+2 |
|/ / | |||||
* | | Drop yield_from API, add a new YieldFrom node instead. | Claudiu Popa | 2014-03-04 | 1 | -2/+3 |
| | | | | | | | | | | --HG-- branch : yield_from | ||||
* | | Use .infer. | Claudiu Popa | 2013-12-18 | 1 | -1/+1 |
| | | | | | | | | | | --HG-- branch : metaclass | ||||
* | | Add Changelog entry regarding `metaclass`, add a new test for py3k. | Claudiu Popa | 2013-12-18 | 1 | -1/+1 |
| | | | | | | | | | | --HG-- branch : metaclass | ||||
* | | Add tests. | Claudiu Popa | 2013-08-13 | 1 | -1/+1 |
| | | | | | | | | | | --HG-- branch : metaclass | ||||
* | | Change metaclass discovery. | Claudiu Popa | 2013-08-13 | 1 | -10/+15 |
| | | | | | | | | | | --HG-- branch : metaclass | ||||
* | | Return a string depicting the metaclass, not the metaclass itself. | Claudiu Popa | 2013-07-24 | 1 | -1/+4 |
| | | |||||
* | | Add support for metaclass for Python 3. | Claudiu Popa | 2013-07-24 | 1 | -1/+4 |
| | | |||||
* | | Add metaclass support for Class node. | Claudiu Popa | 2013-07-24 | 1 | -0/+11 |
|/ | |||||
* | rename all astroid_from* method, introduced by sed, into ast_from* | Sylvain Thénault | 2013-07-24 | 1 | -3/+3 |
| |