Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Make sure that Attribute.infer has a protection against StopIterations | Claudiu Popa | 2019-01-19 | 1 | -3/+5 |
| | |||||
* | Remove StopIteration handling which should not leak at all from inference | Claudiu Popa | 2019-01-18 | 1 | -9/+1 |
| | |||||
* | Move infer_name_module() in pylint and remove it from here | Claudiu Popa | 2019-01-13 | 1 | -9/+0 |
| | |||||
* | Revert path copying in InferenceContext() | Claudiu Popa | 2018-12-30 | 1 | -3/+0 |
| | | | | | | | | While copying the path solves some inference issues, it also leads to horrenduous performance hits on large libraries such as pandas. We still want to have the path copying, but we need a better understanding on why that is needed, as well as a change on how we operate with the inference contexts. | ||||
* | Multiple "value" or "slice" values on subscript inference. | Daniel Martin | 2018-10-15 | 1 | -46/+43 |
| | | | | Fixes astroid bug #614. | ||||
* | Replace a nested for loop with a product() call | Claudiu Popa | 2018-10-11 | 1 | -15/+8 |
| | |||||
* | Use yield from | Claudiu Popa | 2018-10-10 | 1 | -2/+1 |
| | |||||
* | Remove unneeded comment | Claudiu Popa | 2018-10-10 | 1 | -3/+0 |
| | |||||
* | Replace a nested for loop with itertools.product | Claudiu Popa | 2018-10-10 | 1 | -15/+16 |
| | |||||
* | Replace checks against None and Uninferable to boolean checks | Claudiu Popa | 2018-10-10 | 1 | -3/+3 |
| | | | | Uninferable acts as None so that should be enough. | ||||
* | Simplify the creation of extra_context for _infer_call | Claudiu Popa | 2018-10-10 | 1 | -3/+2 |
| | |||||
* | Use copy_context where it makes sense | Claudiu Popa | 2018-10-10 | 1 | -6/+5 |
| | |||||
* | Initial formatting of astroid | Claudiu Popa | 2018-10-02 | 1 | -94/+143 |
| | |||||
* | Pass parameters by keyword name when inferring sequences. | Claudiu Popa | 2018-09-28 | 1 | -1/+2 |
| | | | | Close PyCQA/pylint#2526 | ||||
* | infer_call_result can raise InferenceError so make sure to handle that for ↵ | Claudiu Popa | 2018-07-31 | 1 | -1/+0 |
| | | | | | | | | | | | 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 | ||||
* | Cut obsolete "explicit StopIteration" comments | Nick Drozd | 2018-07-30 | 1 | -10/+0 |
| | | | | The explicit StopIterations were themselves were cut in ceeee097. | ||||
* | Spelling fixes | Ville Skyttä | 2018-07-24 | 1 | -2/+2 |
| | |||||
* | Fix lint error | Bryce Guinta | 2018-07-24 | 1 | -0/+1 |
| | | | | pylint doesn't understand decorators | ||||
* | Wrap the inference functions with raise_if_nothing_inferred where we didn't ↵ | Claudiu Popa | 2018-07-24 | 1 | -1/+16 |
| | | | | | | | have any guards against them This is especially important in a Python 3.7 worlds where we need to handle StopIteration that can be triggered by next() over empty generators. | ||||
* | Rename method for making it clearer | Claudiu Popa | 2018-07-24 | 1 | -15/+15 |
| | |||||
* | Update the copyright noticesastroid-2.0 | Claudiu Popa | 2018-07-15 | 1 | -2/+14 |
| | |||||
* | Fix inference for nested calls | Bryce Guinta | 2018-07-05 | 1 | -3/+3 |
| | | | | | | | | | Add context_lookup to the context class as extra_context. Deliver the correct context with the correct boundnode for function argument nodes. Close #177 | ||||
* | Refactor assinging boundnode to context | Bryce Guinta | 2018-07-04 | 1 | -7/+4 |
| | | | | | Code in multiple places had the same pattern for infering call results. | ||||
* | Make sure that context_lookup is always defined | Claudiu Popa | 2018-06-13 | 1 | -1/+6 |
| | |||||
* | Remove useless TODOs that are either issues in the issue tracker or things ↵ | Claudiu Popa | 2018-06-12 | 1 | -7/+2 |
| | | | | which we'll never get to fix/change | ||||
* | Convert to yield from | Nick Drozd | 2018-06-08 | 1 | -17/+9 |
| | | | | | | | I tried this to see if it would improve performance. It didn't, but it does look nicer, so we might as well keep it. See also 5fd5aa81483e709cb5c464c7d4bb37c8c39f2afa | ||||
* | Don't propagate Uninferable objects when inferring BinOps | Claudiu Popa | 2018-06-05 | 1 | -0/+2 |
| | | | | Close PyCQA/pylint#2059 | ||||
* | Remove reraise() in favour of using raise..from | Claudiu Popa | 2018-05-31 | 1 | -14/+27 |
| | |||||
* | Fix lint errors | Ashley Whetter | 2018-05-05 | 1 | -6/+6 |
| | |||||
* | Fix StopIteration raising for python3.7 (#534) | HoverHell | 2018-04-24 | 1 | -8/+14 |
| | | | | | | Because we don't support Python 2 any longer in the master branch, we can return values from generators to signal that we want to throw a StopIteration, without actually raising the StopIteration itself. | ||||
* | Set context boundnode for binary operation to correct inference | Bryce Guinta | 2018-03-30 | 1 | -0/+2 |
| | |||||
* | Add context_lookup to infer_call_result for function arguments | Bryce Guinta | 2018-03-30 | 1 | -1/+20 |
| | | | | | | | | This allows inference of function arguments to be different than the inference of the function body Currently this is only used for object.__new__(cls) calls but can be expanded later | ||||
* | Fix duplicate values in inferred dictionary node from dictionary unpacking | Bryce Guinta | 2018-03-02 | 1 | -2/+26 |
| | |||||
* | Fix augassign recursion error | Bryce Guinta | 2018-02-18 | 1 | -5/+0 |
| | | | | | | | | | | | | | | | The augmented assign rhs context path was deleted most likely due to a recently fixed inference bug where InferenceContext path attributes were shared between objects. Recursive functions on the right hand side of the augmented assign would forget that they were already called, causing an eventual RecursionError in astroid inference Now that the InferenceContext clone() method properly copies the inference path between Contexts, it's fine to remove this hack. Fixes #437, Fixes #447, Fixes #313, Fixes PyCQA/pylint#1642, Fixes PyCQA/pylint#1805, Fixes PyCQA/pylint#1854, Fixes PyCQA/pylint#1452 | ||||
* | Fix lint warnings | Claudiu Popa | 2017-10-12 | 1 | -0/+1 |
| | |||||
* | Skip Uninferable inferred objects when inferring a Dict | Claudiu Popa | 2017-08-12 | 1 | -1/+1 |
| | | | | Close PyCQA/pylint#1619 | ||||
* | Catch _NonDeducibleTypeHierarchy in inference._infer_augassign (#443) | Michał Masłowski | 2017-07-08 | 1 | -4/+2 |
| | | | | Similarly to _infer_binop, we have to handle exceptions raised by helpers.is_subtype and helpers.is_supertype in _infer_augassign. | ||||
* | Typo | Claudiu Popa | 2017-03-12 | 1 | -1/+1 |
| | |||||
* | Move the iteration inside the try branch, which makes the quickstart redundant | Claudiu Popa | 2017-03-12 | 1 | -20/+3 |
| | |||||
* | Quickstart _infer_binary_operation to raise errors that occur during startup. | Calen Pennington | 2017-03-12 | 1 | -0/+16 |
| | | | | | | | | | | | | | | | | | | | | | | | Since https://github.com/PyCQA/astroid/commit/3e27213914271309a4716662b09fda91fca9efa1, is_subtype and is_supertype raise exceptions when they can't find a relationship between types. This is caught by the callers of _infer_binary_operation. However, the error is only thrown after the generator return by _infer_binary_operation is started. Prior to this patch, the generator is only started inside the else clause of: try: results = _infer_binary_operation(lhs, rhs, self, context, _get_binop_flow) except exceptions._NonDeducibleTypeHierarchy: yield util.Uninferable else: for result in results: yield result To address this, the quickstart decorator pulls the first value from the generator when it's called, and then buffers that first result until it is needed by the later iteration. | ||||
* | Move the catching of AttributeInferenceError where .getitem() is called, in ↵ | Claudiu Popa | 2017-03-01 | 1 | -0/+1 |
| | | | | infer_subscript | ||||
* | Raise InferenceError in Class.getitem. Close #395 | Claudiu Popa | 2017-03-01 | 1 | -1/+1 |
| | |||||
* | Infer starred expressions in tuple, list, set and dict literals (#396) | Łukasz Rogalski | 2017-02-14 | 1 | -4/+69 |
| | |||||
* | Fix the discrepancies between master and 2.0 code | Claudiu Popa | 2016-12-30 | 1 | -7/+3 |
| | |||||
* | Add support for binary operations between classes. | Claudiu Popa | 2016-12-30 | 1 | -1/+6 |
| | |||||
* | Add a new mechanism for retrieving the special methods. | Claudiu Popa | 2016-12-30 | 1 | -1/+8 |
| | |||||
* | Add support for inferring unary binary op for classes | Claudiu Popa | 2016-12-30 | 1 | -1/+1 |
| | |||||
* | Let the type error propagate as an AstroidTypeError. | Claudiu Popa | 2016-12-03 | 1 | -1/+3 |
| | |||||
* | getitem() method accepts nodes now, instead of Python objects. | Claudiu Popa | 2016-11-21 | 1 | -43/+9 |
| | |||||
* | Fix some pylint errors over the code base. | Claudiu Popa | 2016-08-24 | 1 | -1/+1 |
| |