1
0
forked from VimPlug/jedi
Commit Graph

47 Commits

Author SHA1 Message Date
Dave Halter
3c75f27376 Move the base Context stuff to another module to keep context free for imports. 2017-09-30 16:46:07 +02:00
Dave Halter
8f177eea07 Move the ModuleContext to a separate module. 2017-09-29 13:24:48 +02:00
Dave Halter
f69d8f1f29 _get_definition -> get_definition in parso. 2017-09-03 00:50:52 +02:00
Dave Halter
6419534417 Some more _get_definition fixes 2017-09-02 21:37:59 +02:00
Dave Halter
9bca3d39f5 Actually use parso now instead of Jedi. 2017-05-19 14:20:14 -04:00
Dave Halter
a0b65b52c6 used_names -> get_used_names(). 2017-04-12 08:56:11 +02:00
Andy Lee
1624f6945e Fix api.usages so it finds cross-module usages 2017-04-01 15:52:22 +02:00
Dave Halter
448bfd0992 Move the python parser tree. 2017-03-16 17:20:32 +01:00
micbou
a859add6d7 Only resolve names for actual modules
A name can be part of an import statement without being a module.
2017-03-01 21:06:21 +01:00
Dave Halter
ae8e43d3c7 Move get_node() to tree_node and replace all the custom classdefs/funcdefs. 2017-01-05 23:43:12 +01:00
Dave Halter
57857b6332 Remove the ImportWrapper and replace it with something simpler. 2016-12-17 16:08:37 +01:00
Dave Halter
eaf0100446 Some analysis improvements. 2016-12-11 15:03:19 +01:00
Dave Halter
ba8a3215f2 Fix some issues with usages and imports. 2016-12-02 23:51:01 +01:00
Dave Halter
e79ebe3ee7 Usage fixes for imports. 2016-11-19 03:05:10 +01:00
Dave Halter
b77fa58058 Fix most usage tests. 2016-11-19 02:24:34 +01:00
Dave Halter
052f6bf9e7 Fix some small import stuff and the whole ordering tests. 2016-11-11 00:45:16 +01:00
Dave Halter
265e6b2c35 Change parser and api to use tree instead of pr. 2015-04-27 23:38:48 +02:00
Dave Halter
64ebfb0644 Usages/imports cleanup. 2014-12-18 03:22:46 +01:00
Dave Halter
0147a7f68d usages cleanup 2014-12-17 01:44:06 +01:00
Dave Halter
b2267d3878 Fix usages. 2014-12-03 16:34:31 +01:00
Dave Halter
6bf154de5e Better goto for imports, which helps usages. 2014-12-03 16:15:31 +01:00
Dave Halter
9f45f18ad1 Added a grammar param to the parser. 2014-11-24 01:10:39 +01:00
Dave Halter
c152a1c58b Actually replace tree with representation (in all the imports). 2014-11-23 19:46:52 +01:00
Dave Halter
f1cbd45575 Usages are pretty solid now except for parser issues. 2014-11-22 15:43:23 +01:00
Dave Halter
b82e1e28e5 Get at least some usages stuff right. 2014-11-22 02:05:36 +01:00
Dave Halter
03e01631cc Remove NamePart from existance and rename it to Name. 2014-09-26 16:29:53 +02:00
Dave Halter
59225ceaa3 usages issues. 2014-09-25 00:14:43 +02:00
Dave Halter
b2342c76be Refactoring: Make Import.get_all_import_names return NameParts. 2014-09-19 01:40:09 +02:00
Dave Halter
5e28d69437 Fix remaining usage issues. 2014-09-10 17:15:58 +02:00
Dave Halter
4060c4dc55 Fix some goto issues. 2014-09-10 16:39:09 +02:00
Dave Halter
fb10199f37 Remove search_name and search_name_part from goto returns.
The search_name can be retrieved by checking definitions for it. Definitions should always be names or even better name_parts in case of goto. Therefore we can just get it there.
2014-09-03 23:28:19 +02:00
Dave Halter
18204c4c19 By trying to get rid of search_name in usages, we had to fix an issue with imports:
If used like 'follow(is_goto)', it could return a ModuleWrapper instead of a Name, which is what we actually want.
2014-09-03 19:30:00 +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
33e5a3280a Remove IsScope in favor of an is_scope function.
This function was partially implemented anway. Now we've also added a function called 'get_parent_scope', to make it easy to get a scope of a Call, Statement, whatever.
2014-08-12 01:19:19 +02:00
Dave Halter
e5fe726862 imports cleanup & documentation 2014-05-12 11:15:17 +02:00
Dave Halter
e5326acf8f ImportPath -> ImportWrapper 2014-04-30 17:15:59 +02:00
Dave Halter
8edaea31e2 simplify some usage stuff 2014-04-29 14:01:24 +02:00
Dave Halter
bc7896f93d unicode issues in usage matching 2014-04-29 12:20:25 +02:00
Dave Halter
0301606d18 Now remove Usage completely. 2014-04-18 14:45:03 +02:00
Dave Halter
240b0c9581 NamePart doesn't have an __eq__ method anymore 2014-04-18 14:36:10 +02:00
Dave Halter
c2bdda339b again Definition/Usage merging 2014-04-18 01:51:09 +02:00
Dave Halter
b643325889 type of NamePart in definition should work. 2014-04-18 01:31:07 +02:00
Dave Halter
5f4c4de229 Usage is now a subclass of Definition, #395 2014-04-17 14:39:22 +02:00
Dave Halter
6a40c9b671 remove get_set_vars completely from existance 2014-04-14 12:40:59 +02:00
Dave Halter
ced5b6ca82 goto_assignments and usages both working now with issues like #315 2014-03-29 16:37:39 +01:00
Dave Halter
600371632f NamePart is now no str subclass anymore. They are separated, which makes us save a lot of dicts 2014-02-13 19:22:36 +01:00
Dave Halter
f6b1e5635e move usages to its own api module usages 2014-01-26 23:04:38 +01:00