summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Restore the posargs argumentClaudiu Popa2016-06-271-1/+2
|
* Add coverage configuration, backported from pylint.Claudiu Popa2016-06-275-16/+57
| | | | This removes the old coverage feature.
* Add configuration for .github issues.Claudiu Popa2016-06-272-0/+15
|
* Add more up-to-date package information. Close #330Claudiu Popa2016-06-271-3/+3
|
* Add runtime virtual classes for DictKeys, DictItems, DictValues and ↵Claudiu Popa2016-06-203-0/+21
| | | | DictInstance.
* Give priority to local special attributes for classes and modulesClaudiu Popa2016-06-053-6/+43
| | | | | | For instance, a module can decide to redefine its __file__ attribute. Previously, this was defaulting to the file name itself, without taking in account local redefinitions.
* Don't restrict building of builtin type's member if they are already in ↵Claudiu Popa2016-06-043-4/+3
| | | | | | | | | | special_attributes The introduction of the special attribute models led to an interesting bug, where some of the members of the builtin type were not added into it, since they were already defined at the level of the special_attributes. The latter is just a declaration of what attributes a type can have, usually leading to introspecting the type itself for retrieving the value of the special attribute.
* Proper bound and _proxied objects for __subclasses__ and __mro__ pointing to ↵Claudiu Popa2016-06-042-2/+36
| | | | type.mro, respectively type.__subclasses__.
* Now is_subtype / is_supertype raises an internal exception when a type ↵Claudiu Popa2016-06-034-18/+38
| | | | | | | | hierarchy can't be determined It used to return Uninferable, but no call site was actually taking care of this potential return. It is better though to simply raise an exception and to let the call sites to handle them in which way they want to.
* Try to canonicalize the lookup paths as well.Claudiu Popa2016-06-011-2/+9
|
* Split brain_stdlib into multiple modules and finally kill it.Claudiu Popa2016-05-316-231/+276
|
* Canonicalize file paths in modpath_from_file, this should help when ↵Claudiu Popa2016-05-311-1/+2
| | | | | | receiving symlinks and whatnot. Close PyCQA/pylint#791
* Add test for not recording assignment locals in ExceptHandlersClaudiu Popa2016-05-252-0/+14
|
* Fix a crash which occurred when the class of a namedtuple could not be inferred.Claudiu Popa2016-05-203-3/+20
|
* Convert all files to new license headerCeridwen2016-05-1762-1754/+1121
|
* Don't look for namespace packages implicitly into functions doing concrete ↵Claudiu Popa2016-05-102-35/+26
| | | | imports.
* Move the test data namespace packages where they belong.Claudiu Popa2016-05-0928-11/+0
|
* Add Changelog entry for namespace packages.Claudiu Popa2016-05-092-1/+14
|
* Build a dummy module object for namespace directories and add a test for ↵Claudiu Popa2016-05-099-2/+27
| | | | multiple directories contributing to the same namespace.
* Implicit namespace package support for modpath_from_file for Python 3.3+.Claudiu Popa2016-05-092-2/+17
|
* Improve the message.Claudiu Popa2016-05-091-3/+1
|
* Compute the namespace package path with pkg_resourcesClaudiu Popa2016-05-091-1/+1
|
* Support namespace packages only for versions with the module spec feature ↵Claudiu Popa2016-05-091-1/+1
| | | | implemented.
* Don't introduce empty values for non-zip importers in path_importer_cache ↵Claudiu Popa2016-05-094-2/+13
| | | | and add a test for implicit namespace packages.
* Switch to a spec finder protocol for finding files or packagesClaudiu Popa2016-05-094-125/+226
|
* Add test for old namespace packages protocol.Claudiu Popa2016-05-0925-0/+37
|
* Don't crash when a decorated method has the same name as the decorator, ↵Claudiu Popa2016-04-303-1/+22
| | | | which is a builtin object (a property)
* Improve inference with regard redefinition of values in subclassesClaudiu Popa2016-04-263-1/+60
| | | | | | | | The inference can handle the case where the attribute is accessed through a subclass of a base class and the attribute is defined at the base class's level, by taking in consideration a redefinition in the subclass. This should fix https://github.com/PyCQA/pylint/issues/432
* Calling lambda methods (defined at class level) can be understood.Claudiu Popa2016-04-263-1/+20
|
* Add brain tip for get_distributionClaudiu Popa2016-04-261-0/+3
|
* Move pkg_resources tip into their own fileClaudiu Popa2016-04-262-55/+79
|
* Apply automatically the transforms for the builtin module, since they might ↵Claudiu Popa2016-04-251-1/+5
| | | | not be applied.
* Don't take in consideration invalid assignments, especially when __slots__ ↵Claudiu Popa2016-04-255-1/+142
| | | | | | declaration forbids them. Close issue #332
* Functional form of enums support accessing values through __call__.Claudiu Popa2016-04-133-8/+21
|
* Understand the `dir` builtin.Claudiu Popa2016-04-053-0/+242
| | | | | | This can be used for understanding highly dynamic code, which involves modifications of attributes at runtime (updating globals for example, where the elements come from a dir(something))
* Apply the strings / bytes patching only when the builtins module gets builtClaudiu Popa2016-03-303-13/+17
| | | | | | | | | | | | This patch fixes a problem with the transforms on Python 2, which were never called due to a bad interaction between a transform and the underlying inference mechanism. The string / byte class was patched before the brain modules were loaded, since extend_str was called at the module level. Inside extend_str we were using .locals, which triggers .delayed_assignments, which can trigger as well inference. In the case of Python 2, this led to importing of the six module before actually having the transforms ready for it, which means that no transforming was ever done for some of these modules. By delaying the patching of the builtins module until builtins is ready, we alleviate this problem.
* Add brain tips for the functools.lru_cache decorator.Claudiu Popa2016-03-283-0/+102
|
* Add brain tips for the ssl library.Claudiu Popa2016-03-243-0/+75
|
* Try to see if the object from the determined module is actually the object ↵Claudiu Popa2016-03-191-7/+11
| | | | | | | | | | | | | | | | | | we're building They can be different when in the original module (let's say an __init__ file) the object is imported under a name and then used as a base class for a class with the same name as the object in question, paired with the fact that the initial object is faking its name inside is original module. This happens for instance with the bitarray module, which has a bitarray._bitarray C extensions, which defines a bitarray._bitarray._bitarray type, the latter faking its name as bitarray._bitarray. In the __init__ file, the original type gets used as a base class in the actual bitarray class that the module exports. What happens is that this behaviour will introduce a cycle in the form of an ImportFrom as in 'from bitarray._bitarray import _bitarray as _bitarray` when analyzing the bitarray._bitarray module, which means that the resulting ast will reimport itself, leading to not inferring anything from the module. The solution we're using is to check that the module where we expected to have our object actually has the object we want. Unfortunately I couldn't find a Python test through which we can reflect this behaviour
* decoratornames() does not leak InferenceError anymore.Claudiu Popa2016-03-113-2/+22
|
* Add test for slots and dict.keys.Claudiu Popa2016-03-061-0/+12
|
* dict.values, dict.keys and dict.items are properly inferredClaudiu Popa2016-03-067-6/+168
|
* Add missing Python 2 function model attributes.Claudiu Popa2016-03-062-0/+38
|
* Exceptions have their own object modelClaudiu Popa2016-03-037-2/+100
| | | | | | | | | | | Some of exceptions's attributes, such as .args and .message, can't be inferred correctly since they are descriptors that get transformed into the proper objects at runtime. This can cause issues with the static analysis, since they are inferred as different than what's expected. Now when we're creating instances of exceptions, we're inferring a special object that knows how to transform those runtime attributes into the proper objects via a custom object model. Closes #81
* Try to compute descriptors only for objects with the source code available.Claudiu Popa2016-03-013-7/+13
|
* Separate the UnboundMethod from BoundMethodClaudiu Popa2016-02-275-33/+38
| | | | | They were previously tied because UnboundMethod had logic for type.__new__. Now this logic was moved into a brain tip, simplifying the implementations of the methods.
* Unbound methods don't occur anymore on Python 3Claudiu Popa2016-02-258-35/+107
| | | | | | | Instead, we're inferring FunctionDefs where an unbound access to a method was found. Close #257
* Merge pull request #319 from PyCQA/special_attributesClaudiu Popa2016-02-237-92/+1017
|\ | | | | Introduce a special attributes model
| * Introduce a special attributes modelClaudiu Popa2016-02-237-92/+1017
|/ | | | | | | | Through this model, astroid starts knowing special attributes of certain Python objects, such as functions, classes, super objects and so on. This was previously possible before, but now the lookup and the attributes themselves are separated into a new module, objectmodel.py, which describes, in a more comprehensive way, the data model of each object.
* Add a __repr__ for CallSite. Close #209Claudiu Popa2016-02-191-0/+8
|