1
0
forked from VimPlug/jedi
Commit Graph

301 Commits

Author SHA1 Message Date
Dave Halter 4d3a698a12 Refactor things so goto is working in both directions 2019-05-05 01:16:52 +02:00
Dave Halter 0e42df2da7 Refactor Jedi so we use stub modules as much as possible 2019-05-01 00:52:02 +02:00
Dave Halter aaae4b343e Errors in import module are now better reported 2019-04-05 12:21:05 +02:00
Dave Halter fa17681cf6 Goto definitions goto stubs now have a proper implementation 2019-04-03 00:28:15 +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 a437c2cb02 Fix test_imports tests, now zip imports work again 2019-03-26 09:16:38 +01:00
Dave Halter b6612a83c3 WIP import improvement, getting rid of bad old code 2019-03-21 23:22:19 +01:00
Dave Halter 234f3d93cd Rewrite py__package__ to return a list 2019-03-18 10:01:18 +01:00
Dave Halter b7a164afa8 Merge branch 'master' into typeshed 2019-03-08 18:59:33 +01:00
Dave Halter b659b20d27 Fix an issue between different subprocess versions 2019-03-08 18:20:00 +01:00
Dave Halter d77e43b57d Enforce unicode because of Python 2 2019-03-08 16:41:08 +01:00
Dave Halter 5743f54d69 One more relative import fix 2019-03-08 16:01:56 +01:00
Dave Halter 1914d10836 Fix relative imports outside of the proper paths 2019-03-08 14:25:54 +01:00
Dave Halter 6b579d53ec Some more refactoring for relative imports 2019-03-08 10:54:28 +01:00
Dave Halter c1d65ff144 Start reworking the relative imports 2019-03-07 00:27:51 +01:00
Dave Halter 9d19b060a9 Add a better comment for imports 2019-03-04 09:34:17 +01:00
Dave Halter 23d61e5e97 Restructure relative importing a bit and improve tests 2019-03-04 09:24:38 +01:00
Dave Halter 467c2e5def Merge branch 'master' into typeshed
There were quite a few conflicts, because there were two rewrites of the path
to dotted function.
2019-03-01 10:13:16 +01:00
Dave Halter 1a32663f85 The calculation of dotted paths from normal paths was completely wrong 2019-02-28 09:42:56 +01:00
Dave Halter e2ab4c060f Move all the gradual typing stuff into one folder 2018-12-24 17:40:47 +01:00
Dave Halter ca784916bb Fix get_modules_containing_name 2018-12-22 14:33:24 +01:00
Dave Halter fcda62862c Fix calculate_dotted_path_from_sys_path. It was broken beyond stupid. 2018-12-18 09:30:49 +01:00
Dave Halter d90011c002 Cleanup a few issues with the latest module refactoring 2018-12-05 22:55:56 +01:00
Dave Halter eb27c64c71 Make os.path import issues clearer 2018-11-25 19:25:21 +01:00
Dave Halter fbc327b960 Refactor py__get__ support pretty heavily 2018-11-01 19:09:07 +01:00
Dave Halter b14b3d1012 Better debugging 2018-10-06 16:42:02 +02:00
Dave Halter ad83f5419a Merge branch 'master' into typeshed 2018-10-02 19:07:59 +02:00
Dave Halter c24eb4bd67 Fix tensorflow issues with a few hacks (temporary), fixes #1195 2018-10-02 00:52:11 +02:00
Dave Halter 75a02a13d9 Use ContextSet closer to they way how Python's set works 2018-09-24 20:30:57 +02:00
Dave Halter e3203ebaa5 Try to change the module cache 2018-09-02 13:06:36 +02:00
Dave Halter 4e75a35468 Fix stub searching for nested modules 2018-07-27 10:14:37 +02:00
Dave Halter 1739ae44f0 Refactor some of the import logic so it's possible to load typeshed modules 2018-07-24 01:19:09 +02:00
Dave Halter 18f26a0c04 Change a module is None check to raise an Exception 2018-07-23 23:57:27 +02:00
Dave Halter 873558a392 Move the os.path hack 2018-07-23 23:04:14 +02:00
Dave Halter c88afb71c9 Import names are now always strings 2018-07-23 22:40:24 +02:00
Dave Halter 27ab4ba339 Add the flask plugin and move the import hacks there 2018-07-23 04:04:21 +02:00
Dave Halter 8a9202135b Move import logic around a bit 2018-07-23 03:54:10 +02:00
Dave Halter 4b276bae87 The import resolution for namespace packages was wrong
With this change we can now include all parents of the script, which will make
relative imports always work.

Now the whole meta_path is scanned and not just importlib's PathFinder.

Fixes #1183.
2018-07-21 00:16:10 +02:00
Dave Halter a59e5a016f Actually use the fast_parser setting again 2018-07-05 21:31:03 +02:00
Dave Halter 37a40d53a8 Use an import name list as long as possible 2018-07-05 18:11:58 +02:00
Dave Halter d8c0d8e5d2 Different _load_module API 2018-07-05 10:15:49 +02:00
Dave Halter 508ed7e5b8 Directly load modules if possible, with this it's not necessary anymore to use dotted_from_fs_path, also fixes #1013. 2018-07-05 10:03:05 +02:00
Dave Halter f4aad8bbfe Finally make it possible to use auto_import_modules for packages
This means that you can now write 'from gi.repository import Gtk' and Gtk completions work.

It also means that other libraries could be used like that for speed or other reasons.

Fixes #531
2018-07-03 00:58:43 +02:00
Daniel Hahler aa6857d22d check_fs: handle FileNotFoundError
Ref: https://github.com/davidhalter/jedi-vim/pull/801
2018-04-17 23:40:25 +02:00
Dave Halter 323a85db7c Fix the module_name issue again 2018-04-10 21:27:47 +02:00
Dave Halter 9b17be9ecf Cleanup some of the module cache stuff 2018-04-10 19:16:18 +02:00
micbou cf5f06f378 Do not cache unimportable compiled module (#1079)
From the issue:

The issue can be reproduced by getting the description of the QtBluetooth module from PyQt5 on Windows:

import jedi
completions = jedi.Script('import PyQt5.QtBlueTooth').completions()
completions[0].description

It's hard to write a test for it so we don't write one for it.
2018-04-10 19:10:05 +02:00
Dave Halter 90a226f898 All modules now have a code_lines attribute, see #1062 2018-03-16 10:20:26 +01:00
Dave Halter 81a30d61d6 Fix Python 2 old-school relative imports 2018-02-16 20:53:31 +01:00
Dave Halter 039e7ba07b Some more sys path corrections.
The sys path should be defined more or less in the beginning and not be different for all modules
2018-02-16 14:39:01 +01:00