summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Ensure that generated enum values have the correct base classesenum-fixesPhilip Lorenz2015-05-013-2/+38
| | | | | | | | | | | | | | 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.
* Add basic unit test for enum supportPhilip Lorenz2015-05-011-0/+34
| | | | | This test verifies that the generated enum member stubs behave implement the correct interface.
* Don't let ResolveError leak out from local_attr, when using .mro().Claudiu Popa2015-04-302-1/+13
|
* SyncManager is a context manager as well.Claudiu Popa2015-04-291-0/+2
|
* Expose a implicit_metaclass() method in Class.Claudiu Popa2015-04-253-1/+30
| | | | | This will return a builtins.type instance for newstyle classes, otherwise it will return None.
* remove set_context linejarradhope2015-04-241-1/+0
|
* Add six tips for vendorized requests library.Claudiu Popa2015-04-241-0/+1
|
* Class.local_attr and Class.local_attr_ancestors uses internally a mro ↵Claudiu Popa2015-04-183-2/+41
| | | | | | | | | | | | | lookup, using .mro() method, if they can. That means for newstyle classes, when trying to lookup a member using one of these functions, the first one according to the mro will be returned. This reflects nicely the reality, but it can have as a drawback the fact that it is a behaviour change (the previous behaviour was incorrect though). Also, having bases which can return multiple values when inferred will not work with the new approach, because .mro() only retrieves the first value inferred from a base.
* Don't hard fail when calling .mro() on a class which has combined both ↵Claudiu Popa2015-04-183-5/+40
| | | | | | | newstyle and old style classes. The class in question is actually newstyle (and the __mro__ can be retrieved using Python). .mro() fallbacks to using .ancestors() in that case.
* Handle empty strings as arguments to StopIteration when looking for slots().Claudiu Popa2015-04-181-1/+1
| | | | | StopIteration can have an empty string as an argument on Jython, which lead to an incorrect result when calling .slots().
* Filter out YES results from .decoratornames().Claudiu Popa2015-04-181-1/+2
|
* Fix a typo in the possible properties list and add more tests.Claudiu Popa2015-04-182-2/+13
|
* Make is_property a private function. Remove some trailing whitespaces.Claudiu Popa2015-04-172-12/+9
|
* Support multiple types of known properties in _wrap_attr.Claudiu Popa2015-04-173-2/+64
|
* Remove trailing whitespace.Claudiu Popa2015-04-171-1/+1
|
* Merge.Claudiu Popa2015-04-173-2/+30
|\
| * UnboundMethod.getattr calls the getattr of its _proxied object.Claudiu Popa2015-04-173-2/+30
| | | | | | | | | | | | It previously crashed, since it called super(...).getattr(..) and the first ancestor in its mro was bases.Proxy and bases.Proxy doesn't implement the .getattr method. Closes issue #91.
* | Merged in mplatings/astroid (pull request #70)Claudiu Popa2015-04-1725-94/+585
|\ \ | |/ | | | | Work around the Python 2 part of issue https://bitbucket.org/logilab/astroid/issue/72/installing-astroid-via-setuptools-as-a
| * Improve the inference of Getattr nodes when dealing with abstract properties ↵Claudiu Popa2015-04-173-1/+27
| | | | | | | | | | | | | | | | | | | | from the abc module. In astroid.bases.Instance._wrap_attr we had a detection code for properties, which basically inferred whatever a property returned, passing the results up the stack, to the igetattr() method. It handled only the builtin property but the new patch also handles abc.abstractproperty.
| * .slots() will return an empty list for classes with empty slots.Claudiu Popa2015-04-143-2/+22
| | | | | | | | | | | | Previously it returned None, which is the same value for classes without slots at all. This was changed in order to better reflect what's actually happening.
| * Remove trailing whitespace.Claudiu Popa2015-04-141-1/+1
| |
| * Understand partially the 3-argument form of `type`.Claudiu Popa2015-04-133-19/+57
| | | | | | | | | | | | | | The only change is that astroid understands members passed in as dictionaries as the third argument. This improves the understanding of classes generated on-the-fly, using the type function.
| * Use a check on sys.version_info instead, to accomodate for Python 3.3Claudiu Popa2015-04-021-2/+2
| |
| * Add brain tips for multiprocessing post Python 3.4+.Claudiu Popa2015-04-023-9/+56
| | | | | | | | | | | | | | 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.
| * Remove trailing whitespaceClaudiu Popa2015-04-011-1/+1
| |
| * Set the current function as parent for the Generator object inferred from ↵Claudiu Popa2015-04-013-2/+23
| | | | | | | | `infer_call_result`.
| * Backed out changeset 53b22c3f6ed9Claudiu Popa2015-04-014-49/+2
| |
| * Set the current function as parent for the Generator object inferred from ↵Claudiu Popa2015-04-014-2/+49
| | | | | | | | `infer_call_result`.
| * Proper mro support for six.with_metaclass. Closes issue #85.Claudiu Popa2015-03-312-0/+16
| |
| * Remove unused import.Claudiu Popa2015-03-311-1/+0
| |
| * Run test_multiprocessing_manager only if multiprocessing is available.Claudiu Popa2015-03-311-2/+10
| |
| * Use realpath where it is necessary.Claudiu Popa2015-03-301-2/+2
| |
| * Fix the test.Claudiu Popa2015-03-301-2/+2
| |
| * drone.io debug.Claudiu Popa2015-03-301-2/+1
| |
| * Add debug output for drone.ioClaudiu Popa2015-03-302-1/+2
| |
| * Add some fixes which enhances the Jython support.Claudiu Popa2015-03-3011-39/+93
| | | | | | | | | | | | | | The fix mostly includes updates to modutils, which is modified in order to properly lookup paths from live objects, which ends in $py.class, not pyc as for Python 2, Closes issue #83.
| * 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-283-1/+115
| | | | | | | | multiprocessing.managers.SyncManager.
| * Some style fixes.Claudiu Popa2015-03-281-5/+4
| |
| * Remove trailing whitespace.Claudiu Popa2015-03-271-1/+1
| |
| * Filter out YES nodes when creating a temporary class for the with_metaclass ↵Claudiu Popa2015-03-272-2/+30
| | | | | | | | | | | | | | | | | | hack. Having an YES node in a class bases will lead to a crash with a TypeError when trying to obtain the ancestors of the given class, because .ancestors() will try to iterate each inferred node from the bases, thus will try to iterate over an YES node. This should fix issue #84.
| * Reraise InferenceError with the syntax error that lead to a failed ↵Claudiu Popa2015-03-181-1/+3
| | | | | | | | do_import_module call.
| * Catch SyntaxError in astroid.builder.AstroidBuilder._data_build and reraise ↵Claudiu Popa2015-03-173-3/+10
| | | | | | | | it as AstroidBuildingException.
| * Merge.Claudiu Popa2015-03-174-5/+33
| |\
| | * Fix a deep recursion loop problem: it is best to check if we have visited a ↵Daniel Balparda2015-03-162-4/+28
| | | | | | | | | | | | class by qualified name (qname) instead of by direct objects since some code structures can fool astroid into generating different internal objects for the same class.
| | * Fix bug/crash when confronted with an invalid \x escape (ex: '\x1').Daniel Balparda2015-03-162-1/+5
| | |
| * | Make modutils._search_zip thread safe.Claudiu Popa2015-03-151-1/+1
| |/ | | | | | | | | | | The function was iterating on sys.path_importer_cache.items(), which gets modified sometimes when using multiple threads. This patch wraps the call to .items() in a list() call.
| * Added tag astroid-1.3.6 for changeset bae72378beadClaudiu Popa2015-03-140-0/+0
| |
| * Prepare 1.3.6 release.astroid-1.3.6Claudiu Popa2015-03-142-2/+3
| |