Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Move from % syntax to format or f-strings | Pierre Sassoulas | 2021-02-17 | 1 | -3/+3 |
| | | | | This is possible with python 3.6 | ||||
* | Update copyright notice | hippo91 | 2021-02-15 | 1 | -0/+1 |
| | |||||
* | New copyright notices | hippo91 | 2020-12-27 | 1 | -0/+3 |
| | |||||
* | Add None check on inferred_node | Simon Hewitt | 2020-12-24 | 1 | -0/+1 |
| | |||||
* | Squash one-off inference utility functions to help reduce recursion errors ↵ | Bryce Guinta | 2020-06-23 | 1 | -1/+19 |
| | | | | | | | (#804) This also makes debugging a lot simpler reducing the complexity of the function stack. | ||||
* | Fix exception causes in helpers.py | Ram Rachum | 2020-06-19 | 1 | -4/+4 |
| | |||||
* | Add missing copyright annotations for the past releases | Claudiu Popa | 2020-04-27 | 1 | -1/+1 |
| | |||||
* | Infer the __len__ result of a subclass of an integer | Claudiu Popa | 2020-03-10 | 1 | -2/+11 |
| | | | | | Rather than failing the inference altogether, we can infer the default int value for subclasses of ints. | ||||
* | Pass an inference context to `metaclass()` when inferring an object type | Claudiu Popa | 2019-10-18 | 1 | -1/+1 |
| | | | | | | | | | This should prevent a bunch of recursion errors happening in pylint. Also refactor the inference of `IfExp` nodes to use separate contexts for each potential branch. Close PyCQA/pylint#3152 Close PyCQA/pylint#3159 | ||||
* | Fix lint warnings | Claudiu Popa | 2019-10-11 | 1 | -0/+1 |
| | |||||
* | Fix linting errors | Claudiu Popa | 2019-09-11 | 1 | -1/+1 |
| | |||||
* | Instances of exceptions are inferred as such when inferring in non-exception ↵ | Claudiu Popa | 2019-05-21 | 1 | -1/+1 |
| | | | | | | | | context This allows special inference support for exception attributes such as `.args`. Close PyCQA/pylint#2333 | ||||
* | Add a method to the manager to retrieve the builtins module | Claudiu Popa | 2019-01-19 | 1 | -1/+1 |
| | |||||
* | Initial formatting of astroid | Claudiu Popa | 2018-10-02 | 1 | -23/+31 |
| | |||||
* | infer_call_result can raise InferenceError so make sure to handle that for ↵ | Claudiu Popa | 2018-07-31 | 1 | -5/+1 |
| | | | | | | | | | | | the call sites where it is used infer_call_result started recently to raise InferenceError for objects for which it could not find any returns. Previously it was silently raising a StopIteration, which was especially leaking when calling builtin methods. Since it is after all an inference method, it is expected that it could raise an InferenceError rather than returning nothing. Close PyCQA/pylint#2350 | ||||
* | Update the copyright noticesastroid-2.0 | Claudiu Popa | 2018-07-15 | 1 | -2/+3 |
| | |||||
* | Fix linting | Claudiu Popa | 2018-06-14 | 1 | -5/+4 |
| | |||||
* | Fix len builtin for instances of str or bytes | Bryce Guinta | 2018-03-15 | 1 | -1/+2 |
| | | | | | A ClassDef of str or bytes may have the same qname as a Const value of str or bytes causing an AttributeError in len builtin inference | ||||
* | Locally import FrozenSet node to avoid circular import | Bryce Guinta | 2018-03-11 | 1 | -1/+2 |
| | |||||
* | Implement inference for len builtin | Bryce Guinta | 2018-03-11 | 1 | -0/+42 |
| | | | | Close #112 | ||||
* | Fix the docstring and the comments | Claudiu Popa | 2018-03-10 | 1 | -4/+4 |
| | |||||
* | Rewrite the object_isinstance and object_issubclass helpers to rely on ↵ | Claudiu Popa | 2018-03-10 | 1 | -35/+23 |
| | | | | common code | ||||
* | Add brain inference support for the `issubclass` builtin | Claudiu Popa | 2018-03-10 | 1 | -0/+35 |
| | | | | This is in a similar vein with the `isinstance` builtin, with minor changes. | ||||
* | Replace handling of AstroidError with MroError | Claudiu Popa | 2018-03-05 | 1 | -2/+0 |
| | | | | | I'm not sure why AstroidError was added in the first place, as this is the most general exception in astroid. | ||||
* | Make sure to handle Uninferable by returning it rather than returning an ↵ | Claudiu Popa | 2018-03-05 | 1 | -2/+2 |
| | | | | exception | ||||
* | Add helper function for doing isinstance checks on astroid inferred nodes | Bryce Guinta | 2018-03-02 | 1 | -0/+35 |
| | |||||
* | Fix lint errors | Bryce Guinta | 2018-02-26 | 1 | -2/+2 |
| | |||||
* | Remove Python 2 branches, assume we always run on Python 3 | Claudiu Popa | 2018-02-21 | 1 | -10/+4 |
| | |||||
* | Remove unreachable code | Claudiu Popa | 2017-12-15 | 1 | -1/+0 |
| | |||||
* | Fix lint warnings | Claudiu Popa | 2017-10-12 | 1 | -3/+5 |
| | |||||
* | Even more granular copyrights (thanks to copyrite) | Claudiu Popa | 2016-07-22 | 1 | -2/+3 |
| | |||||
* | Keep a consistent copyright notice across the board. | Claudiu Popa | 2016-07-19 | 1 | -0/+2 |
| | |||||
* | Now is_subtype / is_supertype raises an internal exception when a type ↵ | Claudiu Popa | 2016-06-03 | 1 | -2/+2 |
| | | | | | | | | 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. | ||||
* | Convert all files to new license header | Ceridwen | 2016-05-16 | 1 | -184/+170 |
| | |||||
* | Rename Uninferable and instantiate_class, fix broken tests, improve | Ceridwen | 2015-11-06 | 1 | -5/+5 |
| | | | | | | | | | | | testing. * Rename YES to Uninferable * Rename instanciate_class to instantiate_class. * Use six in test_namedtuple_advanced_inference. * Fix test_file_from_module failure on PyPy. * Add enum34 to unittest_brain. * Add unittest_brain dependencies tox.ini. | ||||
* | Update the docstring of object_type in order to make it clearer for its ↵ | Claudiu Popa | 2015-10-29 | 1 | -2/+4 |
| | | | | actual purpose. | ||||
* | Add support for indexing containers with instances which provides an ↵ | Claudiu Popa | 2015-10-22 | 1 | -0/+24 |
| | | | | | | | | __index__ returning-int method. This patch moves _class_as_index to helpers, where it becames class_instance_as_index. Also, it instantiates its own call context, which makes certain idioms with lambdas to work. | ||||
* | Add tests for aliases | Ceridwen | 2015-08-21 | 1 | -1/+1 |
| | |||||
* | Convert line endings for some files back to DOS | Ceridwen | 2015-08-15 | 1 | -158/+158 |
| | |||||
* | Merge main into default | Ceridwen | 2015-08-14 | 1 | -7/+9 |
|\ | |||||
| * | Move InferenceContext and CallContext into astroid.context | Claudiu Popa | 2015-08-12 | 1 | -1/+2 |
| | | | | | | | | | | | | | | In order to reduce circular dependencies between components, CallContext is moved into a new module, astroid.context. At the same time, for increasing the cohesion inside astroid.bases, InferenceContext was moved as well into astroid.context. | ||||
| * | Move YES to astroid.util. | Claudiu Popa | 2015-08-09 | 1 | -4/+5 |
| | | | | | | | | | | | | | | YES is needed by other components of astroid, components which aren't necessarily related to astroid.bases. In order to reduce circular interdependencies between components, YES is moved into a new module, tailored for various *utilities*. | ||||
| * | Return YES if no types could be deduced for the type builtin. | Claudiu Popa | 2015-08-02 | 1 | -1/+1 |
| | | |||||
* | | Node constructors almost finished except for two bugs | Ceridwen | 2015-07-08 | 1 | -156/+156 |
|/ | |||||
* | Add helpers.is_supertype and helpers.is_subtype, two functions for checking ↵ | Claudiu Popa | 2015-06-26 | 1 | -16/+77 |
| | | | | if an object is a super/sub type of another. | ||||
* | Add astroid.helpers, a module of various useful utilities which don't belong ↵ | Claudiu Popa | 2015-06-24 | 1 | -0/+95 |
yet into other components. Added *object_type*, a function which can be used to obtain the type of almost any astroid object, similar to how the builtin *type* works. |