1
0
forked from VimPlug/jedi
Commit Graph

83 Commits

Author SHA1 Message Date
Dave Halter
1213b51c66 Imports completions after a semicolon work now 2019-06-02 17:54:00 +02:00
Dave Halter
ac962ea6db Refactor stub completions a bit 2019-05-17 16:21:13 +02:00
Dave Halter
e70c49fea2 Use completions from both stubs and actual modules 2019-05-17 16:04:16 +02:00
Dave Halter
f4c17e578c Make it possible to use goto_definition on "broken" imports 2019-03-27 00:39:51 +01:00
Dave Halter
7856d27724 Clarify something about contexts 2018-10-24 00:45:06 +02:00
Dave Halter
511ba5231a Get an own class for type aliases 2018-08-29 22:46:28 +02:00
Dave Halter
68974aee58 Don't use internal parso APIs if possible 2018-06-29 10:04:03 +02:00
Dave Halter
38474061cf Make jedi work with the next parso release 2018-06-29 09:54:57 +02:00
Dave Halter
ba96c21f83 Follow up from the last async issue, fixes more related things about #1092. 2018-04-24 01:02:31 +02:00
Dave Halter
4e5cbe8832 Some code cleanup 2018-03-20 01:40:16 +01:00
Dave Halter
5d36114be4 Use inspect.Parameter.kind for better differentiation between param types
Refs #292
2018-03-13 22:47:08 +01:00
Dave Halter
f9ec989835 Fix REPL completion param name completion
There were two issues:
1. The filter for parameters was wrong
2. In general the equal sign would not be added in some circumstances
2018-03-13 21:36:04 +01:00
Dave Halter
a7168db1ea Remove unused keyword code 2017-12-26 14:13:56 +01:00
Dave Halter
63edbdcc5b Better context completions for finally/except/else/elif
Fixes #837
2017-09-15 00:48:56 +02:00
Dave Halter
2210b11778 Fix some issues with import completion
Fixes #759
2017-09-14 20:09:13 +02:00
Dave Halter
c05f1d3ccc Completion after as in imports should not be possible.
Fixes #841.
2017-09-10 11:27:57 +02:00
Dave Halter
945a2ba405 Dedent some code to avoid issues with parso. 2017-07-09 00:27:23 +02:00
Dave Halter
b90589b62e Some changes because parso has changed. 2017-05-22 15:42:42 -04:00
Dave Halter
9bca3d39f5 Actually use parso now instead of Jedi. 2017-05-19 14:20:14 -04:00
Dave Halter
deb028c3fb Move get_statement_of_position out of the parser tree. 2017-04-15 02:23:08 +02:00
Dave Halter
545cb26f78 stars -> star_count. 2017-04-08 15:26:57 +02:00
Dave Halter
448bfd0992 Move the python parser tree. 2017-03-16 17:20:32 +01:00
Mathias Rav
c809aad67f Complete dotted names properly in decorators
Outside decorators, a dotted name is parsed by the grammar as
stmt -> test -> power -> atom trailer -> (NAME) ('.' NAME)
where the first NAME is an 'atom' and the second NAME is a 'trailer'.

Thus, testing if the most recent variable is a 'trailer' and the most
recent node is a '.' is almost always enough for Jedi to properly
complete dotted names.

However, the grammar for decorators is more restricted and doesn't allow
arbitrary atoms and trailers; instead, a dotted name in a decorator is
decorator -> '@' dotted_name -> '@' (NAME '.' NAME),
meaning the most recent variable will be 'dotted_name', not 'trailer'.

Besides in decorators, the 'dotted_name' variable is only used in import
statements which are handled previously in _get_context_completions,
so checking for 'dotted_name' in this arm of the if only covers decorators
and not inadvertently anything else.
2017-02-04 18:05:15 +01:00
Dave Halter
445bf6c419 Get rid of get_parent_until. 2017-02-03 09:59:32 +01:00
Dave Halter
e0c8b3dd3b Fix an context issue in completions. 2017-01-29 19:09:35 +01:00
Dave Halter
40b6079ebd If an INDENT is the next supposed token, we should still be able to complete. 2017-01-29 14:06:22 +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
e96fd32588 Fix an issue of params completion signatures. 2017-01-04 22:09:08 +01:00
Dave Halter
becf1027c0 Refactor our create_context constructs. 2016-12-06 09:51:57 +01:00
Dave Halter
d74e48dae2 Fix context completions and super calls. 2016-11-29 18:38:04 +01:00
Dave Halter
ba52ecd0df Some isinstance/flow analysis improvements. 2016-11-29 18:19:15 +01:00
Dave Halter
4ad0179b72 Fix named param completion and add a few tests. 2016-11-27 11:27:30 +01:00
Dave Halter
2161be2dcb Fix side effect issues with predefined names and lazy contexts. 2016-11-26 10:16:26 +01:00
Dave Halter
7ed1c95737 Fix dynamic param tests. 2016-11-24 00:11:26 +01:00
Dave Halter
cbd6713b5e Fix a lot of the import completion issues. 2016-11-20 16:37:02 +01:00
Dave Halter
cb86cdec68 Small fixes to the origin_scopes. 2016-11-12 17:01:26 +01:00
Dave Halter
853f9fdb08 Somre more fixes towards basic stuff. 2016-11-12 14:23:44 +01:00
Dave Halter
f57455f0ad Deprecate Evaluator.wrap. 2016-11-01 23:38:06 +01:00
Dave Halter
e34246eb00 Fix __call__. 2016-10-24 00:39:59 +02:00
Dave Halter
2e6603cc2e A lot of small improvements. 2016-10-22 17:40:42 +02:00
Dave Halter
4ccfbb4962 Use super().__getattribute__ instead of custom AttributeErrors in __getattr__. 2016-10-21 02:12:54 +02:00
Dave Halter
cad9ae8ab1 Start implemeting contexts with specialized TreeNameDefinitions to avoid gambling with the parser. 2016-10-20 19:36:44 +02:00
Dave Halter
129c669bc0 Fix private variables in filters. 2016-10-15 19:12:46 +02:00
Dave Halter
fce0eff18a Get rid of all names_dicts in the completion api. 2016-10-12 03:40:24 +02:00
Dave Halter
482103e796 Replace names_dicts with filters in trailer completion. 2016-10-12 02:34:50 +02:00
Dave Halter
862e4a6176 Add filters for the sub module dicts and module attributes dicts. 2016-10-12 02:19:52 +02:00
Dave Halter
9acb5cf1b3 Make it possible to do class context completions even for non functions. Fixes #639. 2016-08-01 23:13:28 +02:00
Dave Halter
647a4db326 Autocomplete inherited methods when overriding in child class. Fixes #458. 2016-07-31 23:09:50 +02:00
Dave Halter
aeb734564c Finally fix all tests. 2016-07-25 00:15:58 +02:00
Dave Halter
7f2f66f011 Trying to refactor the completion stack finding. 2016-07-24 17:06:54 +02:00