1
0
forked from VimPlug/jedi
Commit Graph

5097 Commits

Author SHA1 Message Date
Dave Halter 3c68d3d341 Avoid finding submodules for compiled objects, because it's at least not implemented 2019-11-29 17:18:04 +01:00
Dave Halter 8478ad7ffb Make sure that goto on a subscript colon doesn't crash 2019-11-29 17:10:07 +01:00
Dave Halter 98b592cb68 Fix getitem in compiled
This change just applies a change to CompiledObject that was done to values a long time ago
2019-11-29 16:14:17 +01:00
Dave Halter c38e4fce70 Make sure py__get__ is defined on all values
Also define matches_signature on all signatures, there's definitely cases where that might be called
2019-11-29 15:04:04 +01:00
Dave Halter 6e5e706288 Fix file name completions when file name is too long 2019-11-29 14:11:31 +01:00
Dave Halter 0e92be66db Fix an issue around completions in comments before strings 2019-11-29 13:44:12 +01:00
Sam Roeca 03b4177d3d Fix: no longer shows folders recursively to root
In the previous implementation, Jedi would's traverse_parents function
traversed parent directories to the system root every time. This would
inadvertently add every folder to the system root every time. Obviously,
this is not the behavior desired for the import system.

This pull request provides a new argument to the traverse_parents
function, "root", which represents the root parent for the search. This
argument defaults to None, thereby preserving the existing behavior of
the function.

I chose to duplicate some code for performance reasons. Since I'm trying
to avoid too much path manipulation magic, we do:

* a search to a valid specified root, OR
* a simple upward search until hitting the system root when there is no
valid root specified.
2019-11-28 23:04:08 -05:00
Samuel Roeca 761f0828c7 Fix missing inference for typing.Type[typing.TypeVar] (#1448)
* Add Type[TypeVar] support
* Completion tests for typing.Type[typing.TypeVar]
2019-11-27 22:10:58 +01:00
Jérome Perrin 6d632a01eb Fix inference from type comment for function parameter with dot
fix for https://github.com/davidhalter/jedi/issues/1437
2019-11-08 13:41:17 +01:00
Endill 00b220516d Fix annotation string generated from wrong object 2019-10-26 13:58:15 +02:00
Johannes Maria Frank 364a527fd9 Added missing sorted to scandir 2019-10-22 16:49:35 +01:00
Johannes Maria Frank f61d041830 Switched back to fuzzy off as default 2019-10-22 16:06:46 +01:00
Johannes Maria Frank f7fae4dde7 Added file fuzzy match and refactored 2019-10-22 15:50:16 +01:00
Johannes Maria Frank 0b56bf8f08 Added completions test with fuzzy=True 2019-10-04 17:18:01 +01:00
Johannes Maria Frank 85278242c3 Switched to fuzzy boolean 2019-10-02 00:28:31 +01:00
Dave Halter 6baa3ae8e1 Start working on uniting parts of code of file path/dict completion 2019-09-27 09:36:37 +02:00
Johannes Maria Frank 0bbc8d6e9a Added match_method parameter 2019-09-26 09:12:15 +01:00
Johannes Maria Frank 8f306953da Added experimental substring and fuzzysearch 2019-09-26 08:17:30 +01:00
Dave Halter 88ebb3e140 Get a few more tests passing about dict key strings 2019-09-23 21:05:01 +02:00
Dave Halter 954fd56fcc Get some more dict completions working 2019-09-23 09:21:43 +02:00
Dave Halter e8afb46cde Get the first dict completions passing 2019-09-23 09:18:26 +02:00
Dave Halter e86a2ec566 Small rename 2019-09-08 03:32:47 +02:00
Dave Halter fbe58306c3 Add a few tests for a previous assertion failure 2019-09-05 10:57:04 +02:00
Dave Halter 9c19f72af3 Make sure a compiled instance is is_compiled 2019-09-05 10:13:03 +02:00
Dave Halter 599eded3d1 Remove a few unused imports 2019-09-05 00:54:13 +02:00
Dave Halter 4e68287bba Move eval_node to one place 2019-09-05 00:52:14 +02:00
Dave Halter 008e9860a8 Avoid creating the same object twice 2019-09-05 00:37:51 +02:00
Dave Halter 8cd5932fed Move inference_state.goto to the name and _follow_error_node_imports_if_possible away from inference_state 2019-09-05 00:34:13 +02:00
Dave Halter 67c007338a Make some dynamic array variables private 2019-09-05 00:18:01 +02:00
Dave Halter aea2ddcbd8 ContextualizedName -> TreeNameDefinition 2019-09-05 00:15:38 +02:00
Dave Halter 4d332c32c0 Use create_name instead of duplicated logic 2019-09-05 00:04:24 +02:00
Dave Halter 02046d5333 Replace obj with value 2019-09-04 11:12:30 +02:00
Dave Halter 2faa8ade8b Remove get_object, it's not needed anymore 2019-09-04 11:04:09 +02:00
Dave Halter f9292ca8fa Implement properties properly 2019-09-04 11:00:43 +02:00
Dave Halter 40b01bfd2c Make arguments private for instance 2019-09-04 09:34:22 +02:00
Dave Halter 46e9b9e7cf Refactor dynamic params a bit 2019-09-04 09:31:01 +02:00
Dave Halter 96848dd627 Revert "Refactor some dynamic function arguments things"
This reverts commit e7d9a59da2.
2019-09-04 09:28:31 +02:00
Dave Halter e7d9a59da2 Refactor some dynamic function arguments things 2019-09-04 09:27:06 +02:00
Dave Halter dd400f115a Move some annotation inferring code to proper functions 2019-09-04 01:29:41 +02:00
Dave Halter 34f131e9b3 Remove an unneeded list cast 2019-09-04 01:22:16 +02:00
Dave Halter 47d6ae3da1 SimpleParamName -> AnonymousParamName 2019-09-04 01:20:44 +02:00
Dave Halter 79f9d78c83 Make create_instance_context a lot more understandable (and shorter) 2019-09-04 01:06:25 +02:00
Dave Halter 06d2119f51 Make sure a self variable is only defined in a function not outside 2019-09-04 00:53:46 +02:00
Dave Halter b27f47683c get_first_non_keyword_argument_values is not really used anymore 2019-09-04 00:08:49 +02:00
Dave Halter 0be9ab0caf A simplification 2019-09-04 00:03:03 +02:00
Dave Halter c8564a68df Fix recursion issues about dynamic param lookups and defaults work again 2019-09-03 23:59:31 +02:00
Dave Halter 75262d294f Refactor search_param_names interface 2019-09-03 22:17:30 +02:00
Dave Halter ac4dd06d11 Use get_executed_param_names if get_executed_param_names_and_issues is not necessary 2019-09-03 22:11:00 +02:00
Dave Halter d4f3963cd0 Don't use get_executed_param_names_and_issues as an attribute on arguments 2019-09-03 22:07:34 +02:00
Dave Halter a3659e2750 Remvoe AnonymousArguments 2019-09-03 21:59:50 +02:00