Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | Fix inference of list multiplication operation. | Dmitry Pribysh | 2015-10-24 | 2 | -3/+19 | |
|/ | | | | | | | | | Old implementation was pushing all the possible values inferred from a node into a list, thus creating extra items in case when there are multiple infered values yielded. New implementation takes only first infered value, preserving the expected size of the list. Fixes pylint's #559. | |||||
* | Merged in dmand/astroid/binop-inference-fix (pull request #92) | Claudiu Popa | 2015-10-23 | 2 | -7/+19 | |
|\ | | | | | | | Fix binary operator inference issue from pylint's #646 | |||||
| * | Fix binary operation inference crash by using cloned contextsbinop-inference-fix | Dmitry Pribysh | 2015-10-21 | 1 | -7/+7 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | Idea is that we shouldn't use the same context to infer left-hand side and right-hand side of the binary operation because inferring lhs may leave some metadata in context.path that is irrelevant (and can even break inference) to inference of rhs. So we make two clones of the original context and use them to infer left-hand side and right-hand side independently. And then we use the original context to infer the result of the operation applied to inferred values. This patch fixes pylint's issue #646 and may be also related to other similar astroid issues (#198, #199). | |||||
| * | Add unit test that crashes inference with 'maximum call depth exceeded' error. | Dmitry Pribysh | 2015-10-21 | 1 | -0/+12 | |
| | | ||||||
* | | Remove trailing whitespace. | Claudiu Popa | 2015-10-22 | 1 | -1/+1 | |
| | | ||||||
* | | Add support for indexing containers with instances which provides an ↵ | Claudiu Popa | 2015-10-22 | 5 | -20/+56 | |
| | | | | | | | | | | | | | | | | __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. | |||||
* | | Make class_as_index private. | Claudiu Popa | 2015-10-22 | 1 | -2/+2 | |
| | | ||||||
* | | Create a call context when inferring unary operands on instances. | Claudiu Popa | 2015-10-22 | 2 | -15/+19 | |
| | | ||||||
* | | Create a callcontext when determining an instance's truth value. | Claudiu Popa | 2015-10-22 | 2 | -1/+13 | |
| | | ||||||
* | | Create a context call when __enter__ is called for solving what a context ↵ | Claudiu Popa | 2015-10-22 | 2 | -0/+31 | |
| | | | | | | | | manager returns. | |||||
* | | Replace the use of print in python3/data/module.py, since it complicates the ↵ | Claudiu Popa | 2015-10-22 | 1 | -5/+3 | |
|/ | | | | testing of as_string. | |||||
* | Merged in jayvdb/astroid/use_print_function (pull request #91) | Claudiu Popa | 2015-10-19 | 1 | -1/+1 | |
|\ | | | | | | | Fix SyntaxError on Python 2 for print function | |||||
| * | Merged in jayvdb/astroid/print_statement (pull request #90) | Claudiu Popa | 2015-10-19 | 0 | -0/+0 | |
| |\ | | | | | | | | | | Replace __future__.print_statement with print_function | |||||
| * | | Replace __future__.print_statement with print_functionprint_statement | John Vandenberg | 2015-10-19 | 1 | -1/+1 | |
| |/ | | | | | | | | | | | 1c35a97 fixed Python 2 only print statements, and imported a mix of __future__.print_function and __future__.print_statement. 1826d98 fixed most of them, however this one still remains. | |||||
* | | Fix SyntaxError on Python 2 for print functionuse_print_function | John Vandenberg | 2015-10-19 | 1 | -0/+1 | |
|/ | ||||||
* | Don't reinstall astroid, use the one that's already available. | Claudiu Popa | 2015-10-16 | 1 | -2/+0 | |
| | ||||||
* | Fix Arguments' _other_fields | Ceridwen | 2015-10-12 | 1 | -1/+1 | |
| | ||||||
* | Move proxy_alias function to util.py | Claudiu Popa | 2015-10-11 | 3 | -28/+32 | |
| | ||||||
* | Remove doctype and future imports which aren't useful. | Claudiu Popa | 2015-10-11 | 10 | -15/+1 | |
| | ||||||
* | Remove unused variable. | Claudiu Popa | 2015-10-11 | 1 | -1/+0 | |
| | ||||||
* | Move decorators from bases to decorators module. | Claudiu Popa | 2015-10-11 | 5 | -76/+81 | |
| | ||||||
* | Move bases.NodeNG and bases.Statement in node_classes | Claudiu Popa | 2015-10-11 | 4 | -538/+537 | |
| | | | | | | We're doing this in order to reduce the dependency hell which occurs when a module such as bases.py wants to use classes defined in node_classes. | |||||
* | Remove trailing whitespace. | Claudiu Popa | 2015-10-09 | 1 | -1/+1 | |
| | ||||||
* | The functional form of Enum returns a class, not an instance. | Claudiu Popa | 2015-10-09 | 2 | -1/+13 | |
| | ||||||
* | Support PEP 448 unpackings in dict calls. | Claudiu Popa | 2015-10-08 | 2 | -11/+47 | |
| | ||||||
* | Make duplicated_kwargs a public API. | Claudiu Popa | 2015-10-08 | 2 | -4/+8 | |
| | ||||||
* | Fix pylint warnings. | Claudiu Popa | 2015-10-07 | 1 | -12/+11 | |
| | ||||||
* | Change arguments.ArgumentsInference to arguments.CallSite | Claudiu Popa | 2015-10-07 | 3 | -33/+155 | |
| | | | | | | This new class can be used to obtain the already unpacked arguments and keyword arguments that a call site uses, which is especially useful when some of arguments are packed into Starred nodes. | |||||
* | Change the signature of the ArgumentInference class to accept directly the ↵ | Claudiu Popa | 2015-10-07 | 2 | -10/+13 | |
| | | | | arguments and the keywords of a call site. | |||||
* | Add brain tips for PyQt signals for supporting emit / connect and disconnect ↵ | Claudiu Popa | 2015-10-06 | 3 | -22/+57 | |
| | | | | methods on them | |||||
* | Remove trailing whitespace. | Claudiu Popa | 2015-10-06 | 1 | -1/+0 | |
| | ||||||
* | Add support for looking up into DictUnpack's value in Dict.getitem | Claudiu Popa | 2015-10-06 | 2 | -0/+15 | |
| | ||||||
* | Remove the value from the DictUnpack node, since it's used mostly to ↵ | Claudiu Popa | 2015-10-06 | 2 | -10/+1 | |
| | | | | represent the ** operation. | |||||
* | Fix pylint errors. | Claudiu Popa | 2015-10-06 | 2 | -8/+8 | |
| | ||||||
* | Add a new node, DictUnpack, for representing the unpacking of a dict using ↵ | Claudiu Popa | 2015-10-06 | 6 | -9/+71 | |
| | | | | | | | | | PEP 448 This is a different approach than what the builtin ast module does, since it just uses None to represent this kind of operation, which seems conceptually wrong, due to the fact the AST contains non-AST nodes. Closes issue #206. | |||||
* | Remove trailing whitespace. | Claudiu Popa | 2015-10-03 | 1 | -1/+1 | |
| | ||||||
* | Move objects.Slice back into nodes.Slice | Claudiu Popa | 2015-10-03 | 4 | -49/+37 | |
| | | | | | | We did this because objects.Slice had more capabilities than nodes.Slice, such as inferring the slice attributes (start, stop, step) and it was used mostly for inferring the slice() builtin. | |||||
* | Don't wrap instance's arguments into a Const, instead let the original index ↵ | Claudiu Popa | 2015-10-03 | 2 | -19/+28 | |
| | | | | | | | | object to be used. This prevents a crash when the original index object is a slice object, which was wrapped inadvertendly in a Const node, leading to a crash later on if the said object was inferred. Closes issue #200. | |||||
* | Add a test for issue #188, which was triggered because the transforms ↵ | Claudiu Popa | 2015-10-03 | 1 | -0/+25 | |
| | | | | weren't executed in a separated step. Closes issue #188. | |||||
* | Fix a crash which occurred when inferring unary operands which yielded ↵ | Claudiu Popa | 2015-10-03 | 2 | -0/+10 | |
| | | | | objects which weren't callable. | |||||
* | Skip objects which aren't callable when inferring an instance's call result. | Claudiu Popa | 2015-10-03 | 2 | -1/+17 | |
| | ||||||
* | Make context an optional argument for BoundMethod.infer_call_result. | Claudiu Popa | 2015-10-03 | 1 | -1/+3 | |
| | ||||||
* | Ignore non-callables when looking for special method implementations of bool ↵ | Claudiu Popa | 2015-10-03 | 2 | -1/+22 | |
| | | | | | | | | methods This commit verifies what a special method actually is and if it's not a callable, then we return an YES object, since there's a big chance to not make sense of the instance's boolean value. | |||||
* | Import test from pylint regarding a crash that used to occur a long time ago. | Claudiu Popa | 2015-09-30 | 1 | -0/+10 | |
| | ||||||
* | Import test for pylint regarding context inference in relation with factory ↵ | Claudiu Popa | 2015-09-29 | 1 | -0/+19 | |
| | | | | methods. | |||||
* | Fix a crash which occurred when extra_decorators was considering non-class ↵ | Claudiu Popa | 2015-09-29 | 2 | -1/+27 | |
| | | | | level assignments to the same name as decorator calls. | |||||
* | Remove InferenceContext's __repr__ implementation, since it makes it ↵ | Claudiu Popa | 2015-09-28 | 1 | -6/+0 | |
| | | | | unusable to debug in a repl. | |||||
* | Add test for issue #183. | Claudiu Popa | 2015-09-27 | 1 | -0/+9 | |
| | ||||||
* | Hopefully actually fix #185 | Ceridwen | 2015-09-26 | 2 | -2/+13 | |
| | ||||||
* | Remove trailing whitespace. | Claudiu Popa | 2015-09-26 | 2 | -3/+3 | |
| |