Dave Halter
f604066288
First small implementation of goto.
2014-11-21 14:21:00 +01:00
Dave Halter
08bdcfb8ca
Small issue with relative imports that don't contain a path after from.
2014-11-19 15:22:18 +01:00
Dave Halter
9d5f3162d7
More import stuff. Fake imports work a little bit better.
2014-11-18 18:22:26 +01:00
Dave Halter
259aa6bd5f
First dynamic params working.
2014-11-17 16:23:18 +01:00
Dave Halter
f0a3c37fa0
__file__ should be listed as a module attribute.
2014-11-13 00:24:40 +01:00
Dave Halter
4676998fb5
Playing with params/names_dict
2014-11-03 13:38:57 +01:00
Dave Halter
51ffc54471
Temporary params of class solution.
2014-10-23 14:41:01 +02:00
Dave Halter
387fc3b038
Adding prev_sibling, getting self attributes.
2014-10-23 14:03:52 +02:00
Dave Halter
1c27759c4f
Few fixes.
2014-10-21 13:54:03 +02:00
Dave Halter
54c91b1509
Get a first local test passing.
2014-10-10 12:07:08 +02:00
Dave Halter
03e01631cc
Remove NamePart from existance and rename it to Name.
2014-09-26 16:29:53 +02:00
Dave Halter
c2d645b7c1
Fix one of the really hard issues: deep_ast_copy didn't copy the newly created _names_dict.
2014-09-25 12:15:15 +02:00
Dave Halter
9ecf3774a0
Import issues again.
2014-09-24 21:59:08 +02:00
Dave Halter
1d71b25109
Previously forgot to add the NameParts to used_names. (which had worked before that)
2014-09-22 23:24:29 +02:00
Dave Halter
dae1a48d70
Remove a lot of the old Name.names usages in favor of a direct NamePart usage.
2014-09-22 22:34:33 +02:00
Dave Halter
c4e45916c6
Modules also use a NamePart as a name, now.
2014-09-22 12:52:48 +02:00
Dave Halter
b2342c76be
Refactoring: Make Import.get_all_import_names return NameParts.
2014-09-19 01:40:09 +02:00
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