summaryrefslogtreecommitdiff
path: root/astroid/brain
Commit message (Collapse)AuthorAgeFilesLines
* Ignore exceptions raised by gi.require_versionpygobject-require_versionDavid Shea2015-07-081-2/+6
|
* Duplicate calls to gi.require_version.David Shea2015-07-081-2/+30
| | | | | | | | gobject-introspection uses gi.require_version to choose which version of a library to import from gi.repository, and pygobject now issues a warning if gi.require_version is not used. Find calls to require_version and duplicate them in py2gi.py so that the version data is present in the context of the import.
* Understand metaclasses added with six.add_metaclass decorator. Closes issue ↵Claudiu Popa2015-07-071-1/+28
| | | | #129.
* Fix the body of namedtuple._replace: return the current self and don't ↵Claudiu Popa2015-07-061-5/+2
| | | | actually call self._make, since it's impossible to understand it.
* Add __enter__ and __exit__ for subprocess.Popen.Claudiu Popa2015-07-031-36/+46
|
* Add __reversed__ special method to deques.Claudiu Popa2015-06-261-2/+3
|
* Understand the one-argument form of the builtin *type*.Claudiu Popa2015-06-241-2/+12
| | | | | This uses the recently added *astroid.helpers.object_type* in order to retrieve the Python type of the first argument of the call.
* Namedtuple's instance members gain a new .attrname attribute, since they're ↵Claudiu Popa2015-06-201-0/+1
| | | | actually equivalent to an AssAttr node.
* Add inference support for the `bool` builtin.Claudiu Popa2015-06-171-0/+25
|
* Fix a couple of pylint warnings.Claudiu Popa2015-06-171-4/+2
|
* Add inference support for `callable` builtin.Claudiu Popa2015-06-161-7/+30
|
* Allow inference of tuple(frozenset())Claudiu Popa2015-06-141-4/+4
|
* Set the module name for six.moves fail hook module.Claudiu Popa2015-06-101-1/+3
|
* Improve the inference of six.moves.Claudiu Popa2015-06-101-192/+223
| | | | | | This patch improves especially the inferrence when using `from ... import ...` syntax. Also, we added a new fail import hook for six.moves, which fixes the import-error false positive from pylint. Closes issue #107.
* Add 'assert_equals' method in nose.tools's brain plugin.Claudiu Popa2015-06-091-0/+3
|
* Add inference support for hasattr builtin. Closes issue #102.Claudiu Popa2015-06-071-11/+44
|
* Infer the third argument of the getattr builtin and return the inference result.Claudiu Popa2015-06-061-1/+4
|
* Use an inference context for inferring attributes in infer_getattr.Claudiu Popa2015-06-061-1/+1
|
* Add inference support for getattr builtin.Claudiu Popa2015-06-061-2/+45
| | | | Closes issue #103.
* Use register_builtin_transform for inferring super.Claudiu Popa2015-06-061-6/+2
|
* Update the rules for what descriptor is returned from a super(), depending ↵Claudiu Popa2015-05-281-1/+2
| | | | on the accessed object.
* Add a new *inference object* called SuperClaudiu Popa2015-05-281-1/+73
| | | | | | | | | | | | 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/+8
| | | | | | | | | | | 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.
* Add brain module for dateutil.parser.parsepylint-480raylu2015-05-121-0/+15
|
* Ensure that generated enum values have the correct base classesenum-fixesPhilip Lorenz2015-05-011-2/+2
| | | | | | | | | | | | | | Enum values should share the same base classes as their defining class. If this is not the case it may lead to wrong inference results when an enum member is used - e.g. for the following snippet: class X(enum.IntEnum): one = 1 print([1, 2][X.one]) pylint will detect a "invalid-sequence-index" error as the __index__ method of X.one is not detected.
* SyncManager is a context manager as well.Claudiu Popa2015-04-291-0/+2
|
* Add six tips for vendorized requests library.Claudiu Popa2015-04-241-0/+1
|
* Add brain tips for multiprocessing post Python 3.4+.Claudiu Popa2015-04-021-4/+33
| | | | | | | In Python 3.4+, the module level functions are retrieved with getattr from a context object, leading to many no-member errors in Pylint. This patch ensures us that we can retrieve those attributes, no matter what.
* Add missing tkinter imports.Claudiu Popa2015-03-281-0/+2
|
* Supress py2gi warnings. Patch by Cole Robinson. Closes issue #86.Claudiu Popa2015-03-281-1/+11
|
* Add brain tips for multiprocessing.Manager and ↵Claudiu Popa2015-03-281-0/+52
| | | | multiprocessing.managers.SyncManager.
* Some style fixes.Claudiu Popa2015-03-281-5/+4
|
* Improve the nose brain tips.Claudiu Popa2015-01-281-17/+35
| | | | | | This patch uses `.methods` instead of `.locals`, since the stub class doesn't have any locals. Also, it builds BoundMethods for the assert methods instead of functions as it was done previously.
* Obtain the methods for the nose brain tip through anClaudiu Popa2015-01-271-3/+8
| | | | | | unittest.TestCase instance. Closes Pylint issue #457.
* Get the first element from the method list when obtaining nose.tools.trivial ↵Claudiu Popa2015-01-161-1/+1
| | | | | | functions. Closes Pylint issue #448.
* Add inference tips for nose.tools.Claudiu Popa2015-01-111-0/+56
|
* removed long suffixFran?ois Mockers2015-01-081-2/+2
|
* added properties block_size and digest_size to hashlibFran?ois Mockers2015-01-071-0/+6
|
* Trim two extra lines.Claudiu Popa2015-01-031-2/+0
|
* Add parse and error submodules to six.moves tips.Claudiu Popa2014-12-281-0/+2
|
* Add brain tips for six.moves. Closes issue #63.Claudiu Popa2014-12-181-0/+223
|
* Fix a typo.Claudiu Popa2014-12-111-1/+1
|
* Improve the brain definition of string methods.Claudiu Popa2014-12-041-9/+31
| | | | | | | This patch drops the dynamic building of the methods and adds a couple of arguments for some methods. Nevertheless, this approach will make astroid to believe that some methods accept keyword arguments, while this is not true.
* don't commit/push without checking for unsaved bufferSylvain Th?nault2014-12-042-44/+6
|
* [brain] move code from py2stdlib to builtin_inferenceSylvain Th?nault2014-12-041-0/+43
|
* Add brain definition for most string and unicode methodsSylvain Th?nault2014-12-041-0/+47
|
* Add inference tips for dict calls.Claudiu Popa2014-12-031-1/+68
| | | | | This patch properly infers dict constructor calls, as in dict(), dict(kwarg=value), dict(<iterable>), dict(<mapping>) and dict(<iterable> or <mapping>, **kwarg) syntax.
* Set the col_offset for infered dicts.Claudiu Popa2014-12-021-0/+1
|
* Drop the inference of frozensets as sets.Claudiu Popa2014-11-281-2/+0
|
* Support bytes as arguments for builtins like list, set and tuple.Claudiu Popa2014-11-281-1/+1
|