1
0
forked from VimPlug/jedi
Commit Graph

145 Commits

Author SHA1 Message Date
Dave Halter b68a59daef Fix the last remaining issues of the first part of the NamePart switch. 2014-09-09 15:58:20 +02:00
Dave Halter 1199defabb Start to use NameParts only in Definition contexts. 2014-09-09 14:13:10 +02:00
Dave Halter 2e7e2f0a29 Name parents are now Calls (once their statements have generated the Calls).
This makes the goto function more powerful. Also fixes an issue with the deep_ast_copy, that I tried to fix previously, but failed, because I hadn't tested it.
2014-09-06 12:19:07 +02:00
Dave Halter cb84bc0829 Start using ExprStmt. 2014-09-06 10:46:59 +02:00
Dave Halter f57d9ef675 Rename Name.get_parent_stmt to Name.get_definition, because it's not always a statement. Also start using it in the NameFinder. 2014-09-06 10:43:26 +02:00
Dave Halter ba805879b4 Updated helpers.deep_ast_copy. Now the function copies statements in a better way.
Previously statement attributes where scanned like every other objects. Now two statements get priority: _assignment_details and _expression_list. This is necessary if we want to switch towards proper name parents (A Call would be the parent of a name, not a Statement)
2014-09-05 11:49:45 +02:00
Dave Halter ea5b98905e Make statement_elements_in_statement work with ListComprehensions, Lambdas and 'except foo as' expressions 2014-09-02 14:52:04 +02:00
Dave Halter f785aa26dd Additional helper methods, to find all the statement elements that are needed. 2014-09-02 03:26:17 +02:00
Dave Halter be9e77d7d3 Add a temporary api._names, to make it possible to annotate a full script with types. 2014-09-01 18:10:40 +02:00
Dave Halter bbf1070ad9 Add a helper function to list all name parts of a given module. 2014-09-01 13:20:01 +02:00
Dave Halter 76d91ba72a Rename fast_parent_copy to deep_ast_copy. 2014-08-22 00:59:46 +02:00
Dave Halter ed3b507ab7 cleanup 2014-08-22 00:47:08 +02:00
Dave Halter 039a5ecaf9 Fix issues caused by KeywordStatement, which needs to be copied as well. 2014-08-21 16:51:00 +02:00
Dave Halter 0ef030848d refactor fast_parent_copy, use new_elements_default to hand in a dictionary, that contains all the generated duplicates. 2014-08-21 13:17:33 +02:00
Dave Halter 8bde89cc58 Fix the remaining issues with the StatementElement.next refactoring. 2014-08-19 00:12:14 +02:00
Dave Halter 8006d6f190 Change implementation of StatementElement.
Instead of having both next and execution as attributes, we now only have next, because it's an execution if there's an array.
2014-08-18 22:25:55 +02:00
Dave Halter 00d15da143 refactor search_call_signatures. Now we don't need to set Call.next.parent in a strange way anymore and the whole thing seems to be more logical. 2014-08-18 14:51:38 +02:00
Dave Halter 542648f5a0 first step in refactoring call_signature_array_for_pos, use original_call as a param. 2014-08-18 13:39:01 +02:00
Dave Halter 9f38f10366 fix tests. Operators should not equal to other operators with a different position. or even parent. 2014-08-18 13:13:07 +02:00
Dave Halter fd90dfc4f5 Use a LazyName for module attributes, they should only be generated if needed. 2014-08-15 15:20:40 +02:00
Dave Halter 89ab0ba137 Fix fast_parent_copy. The caching is now more solid than before (and doesn't produce weird side effects. This also solves an issue with Lambdas. However, by fixing all of this we have broken some other things. 2014-08-15 01:55:43 +02:00
Dave Halter 1965469050 fast_parent_copy should also change the parent of NameParts. 2014-08-14 23:48:27 +02:00
Dave Halter c44168f7ad add a Flow.previous attribute to be able to access the if flow from an else clause. 2014-08-05 11:17:18 +02:00
Dave Halter aba4a16ae3 fix indexing issues for multiple index options 2014-06-27 11:23:46 +02:00
Dave Halter 6e82fa31e1 submodules need relative imports not absolute 2014-06-25 11:08:29 +02:00
Dave Halter 44238a9f92 submodules are automatically indexed without actually importing them. fixes #413.
However, this is not a 100% correct Python behavior. Python behavior would be to follow ALL imports in all modules (recursively) and check if the module was imported. However, that's a lot of work, that would slow down autocompletion. For now it's better to have no false positives in flaking and to ignore a few attribute errors.
2014-06-25 01:39:43 +02:00
Dave Halter 43e54b6173 list comprehensions should be able to serve as an input for dynamic params as well. 2014-06-11 21:54:18 +02:00
Dave Halter 248cca2e5e fix issues with empty *args as inputs 2014-05-31 11:03:37 +02:00
Dave Halter d0b2a2ce4f fixed NestedImportModule 2014-05-09 11:52:10 +02:00
Dave Halter f2af053a4a fix the CallSignature.index attribute 2014-05-04 23:36:24 +02:00
Dave Halter 0b5ed6a5fe array_for_pos -> call_signature_array_for_pos 2014-04-19 16:27:41 +02:00
Dave Halter 1f7fd6f439 search_call_signature refactoring 2014-04-19 16:26:15 +02:00
Dave Halter 33fa2b0cb4 call_signatures should work on more nested edge cases 2014-04-18 17:17:10 +02:00
Dave Halter 240b0c9581 NamePart doesn't have an __eq__ method anymore 2014-04-18 14:36:10 +02:00
Dave Halter 6a40c9b671 remove get_set_vars completely from existance 2014-04-14 12:40:59 +02:00
Dave Halter b680246195 docstring working for local definitions as well 2014-03-27 12:34:53 +01:00
Dave Halter db1b73d423 lo and behold - reversed is implemented - the force is strong with this one. fixes #24 2014-03-11 11:04:00 +01:00
Dave Halter cf0a2e8c2e use FakeStatement instead of strange Statement constructions 2014-01-13 14:14:04 +01:00
Dave Halter 4006b231d3 fix a few last standing issues with integration tests. ok after running tests with tox i see that they are not the last issues... 2014-01-12 00:34:56 +01:00
Dave Halter fc35e69a16 adding helpers.FakeName and other fakes to make it easier to fake parser names and statements 2014-01-11 13:41:03 +01:00
Dave Halter 3126031ff2 move module checking again - probably the last time (resolves an import issue) 2014-01-07 15:20:00 +01:00
Dave Halter a74b7299e2 scan_statement -> scan_statement_for_calls 2014-01-07 15:10:19 +01:00
Dave Halter 359f3ed4a9 also moved scan_statement away from dynamic 2014-01-07 15:06:11 +01:00
Dave Halter a5fa739960 moved another method away from dynamic 2014-01-07 15:01:59 +01:00
Dave Halter 887418bbfd move helpers to evaluate 2014-01-06 00:09:29 +01:00