summaryrefslogtreecommitdiff
path: root/bases.py
Commit message (Collapse)AuthorAgeFilesLines
* Move all astroid modules into a its own directory, which is now the package.Torsten Marek2014-11-081-665/+0
| | | | python setup.py develop now works.
* Make the source compatible with Python 2.7 and 3.3+.Claudiu Popa2014-10-271-1/+1
|
* Various speed improvements.Claudiu Popa2014-10-201-55/+103
|\ | | | | | | Patch by Alex Munroe.
| * merged with defaultEevee (Alex Munroe)2014-07-311-6/+5
| |\
| * | Fix some deep recursion problems.Eevee (Alex Munroe)2014-07-021-55/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Add an inference cache to InferenceContext.Eevee (Alex Munroe)2014-07-011-2/+12
| | |
| * | Speed up rebuilder considerably by computing line numbers lazily.Eevee (Alex Munroe)2014-07-011-7/+21
| | | | | | | | | | | | | | | | | | | | | 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-011-27/+28
| | |
| * | Replace copy_context with some dynamic scoping.Eevee (Alex Munroe)2014-07-011-53/+77
| | |
* | | Don't crash when trying to infer unbound object.__new__ call. Closes issue #11.Claudiu Popa2014-08-211-2/+2
| |/ |/|
* | pylint source codeSylvain Thénault2014-07-251-7/+6
|/
* Fix repr for ast nodesJulien Cristau2014-06-031-1/+1
|
* Avoid recursively inferring the same attr on the same class. Closes #7Eevee (Alex Munroe)2014-04-081-0/+3
|
* slightly more readable versionSylvain Thénault2014-04-081-1/+2
|
* fix crash when class has some __call__ method that is not inferable. Closes #17Sylvain Thénault2014-04-081-0/+2
|
* Fix language in a couple of error messagesJulien Cristau2013-06-191-2/+2
|
* fix inference, some node classes have extra arguments there (eg import nodes)Sylvain Thénault2013-06-181-3/+3
|
* [inference] introduce (but not use it yet) explicit inference for some node ↵Sylvain Thénault2013-06-181-3/+20
| | | | instances
* rename the project astroidDavid Douard2013-06-171-15/+15
|
* as_string/repr_tree code cleanup: enhance the doc a bit + regroup codeSylvain Thénault2013-04-111-44/+5
| | | | | | | | | | - move _repr_tree from bases.py to as_string.py - rename as_string function to to_code, though public API Node.as_string is left unchanged for now --HG-- branch : stable
* enhanced generator support. Closes #124340Sylvain Thénault2013-04-111-2/+5
| | | | | --HG-- branch : stable
* minor cleanups: drop copyright by me, update others to 2013, droip those in ↵Sylvain Thénault2013-03-281-4/+1
| | | | | | | dumb test data files, delete some trailing whitespaces --HG-- branch : stable
* unify BUILTINS_NAME / BUILTINS_MODULE into astng.bases.BUILTINSSylvain Thénault2013-03-281-10/+13
| | | | | --HG-- branch : stable
* Fix python 3 crash on importing from a non existing module. Closes #83749FELD Boris2012-07-311-0/+2
| | | | | | Pb is actually silented in python 2 since YES objet are seen as iterable since next() is seen as a proper attribute (returning itself, see _Yes.__getattribute__), while it becomes a function in python 3.
* copy context path when cloning inference context, else we may skip undesired ↵Sylvain Thénault2011-09-291-0/+7
| | | | inference branches. closes #77187
* cosmetic changes: update/fix copyright and comments, d-t-wSylvain Thénault2011-09-271-1/+1
|
* py3k: __builtin__ module renamed to builtins, we should consider this to ↵Sylvain Thénault2011-07-081-2/+4
| | | | properly build ast for builtin objects
* closes #69217: please add column offset to the astng nodeSylvain Thénault2011-06-161-0/+1
|
* add support for object.__new__ (base patch provided by Chris Torek)Sylvain Thénault2011-01-051-0/+9
| | | | | | | | | | The builtin object.__new__ function takes a class and returns an object of that type, i.e., we should infer the result has whatever type we can find from the first argument. To make this work (with Python2.5 at least), we need to note that built in functions whose __module__ is None are really in the __builtin__ module.
* remove some code no more necessary since we don't support anymore python < 2.5Sylvain Thénault2011-01-051-18/+1
|
* cleanup: move StmtMixin to StatementEmile Anclin2010-12-021-0/+20
|
* cleanup: BaseClass is no more neededEmile Anclin2010-12-021-11/+2
|
* reduce circular imports I: import exceptions directlyEmile Anclin2010-12-021-1/+1
| | | | - rename exceptions module: it's exported to Pylint anyway
* support for generator attributesEmile Anclin2010-12-011-1/+6
|
* py3k: fix builtins.propertyEmile Anclin2010-12-011-1/+1
|
* remove more py2.4 relative stuff and fix readmeEmile Anclin2010-11-151-1/+1
|
* refactor: add a "is_function" attribute (wip)Emile Anclin2010-10-181-0/+1
|
* add a "optional_assign" attribute to the NodeNGEmile Anclin2010-10-111-0/+1
| | | | This will make it possible to move LookupMixIn to mixins.py
* move "nodes_as_string.py" to "as_string.pyEmile Anclin2010-10-111-1/+1
|
* py3k: a lot of simple fixesEmile Anclin2010-10-071-1/+2
|
* remove usage of __dict__ to avoid explicit None assign of the fields.Emile Anclin2010-10-071-4/+2
| | | | | We should this way be able to remove the strange 'if node is None' in the 'RebuildVisitor.visit' method and save some time.
* [utils] add a TreeTester class for debuggingEmile Anclin2010-10-061-2/+4
|
* py2.3 compat : syntax, set; _nodes_compiler.py : fix visit_discardEmile Anclin2010-09-221-2/+2
| | | | | --HG-- branch : stable
* add __subclasses__ to special class attributeSylvain Thénault2010-07-131-1/+1
|
* proper licensing information (LGPL-2.1). Hope I get it right this time.Sylvain Thénault2010-04-281-5/+19
|
* more license updatesSylvain Thénault2010-04-261-3/+3
|
* nodes redirection cleanup possible since refactoringSylvain Thénault2010-04-161-2/+1
|
* improve node representations with lineno and module nameEmile Anclin2010-04-151-5/+16
| | | | use it when raising TypeError on Const nodes
* move _astng_fields to concrete classes instead of defining them in nodes.pyEmile Anclin2010-03-171-0/+2
| | | | | --HG-- branch : rebuild
* don't use a stack for InferenceContext.pathEmile Anclin2010-03-171-17/+11
| | | | | | | | The stack failed to detect infinite recursions. This also closes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=568968 --HG-- branch : rebuild