Kirat Singh
d872eef1a7
chore: remove unnecessary for loop
2021-10-06 13:15:20 +00:00
Kirat Singh
53e837055f
fix(import): support for nested namespace packages
...
If multiple directories in sys.path provide a nested namespace
package, then jedi would only visit the first directory which
contained the package. Fix this by saving the remaining path list in
the ImplicitNamespaceValue and add a test for it.
2021-10-02 04:09:27 +00:00
Dave Halter
2ec3d72151
Use "namespace" as a Name.type
2021-01-02 12:14:28 +01:00
Dave Halter
bc4f6ed9dd
Merge branch 'master' into relative-import
2020-12-12 12:15:13 +01:00
Dave Halter
ce0ed4b8ae
Improve a comment
2020-12-10 16:57:09 +01:00
Dave Halter
a03a093e2c
change the create_stub_module stuff a bit
2020-10-24 10:41:59 +02:00
Dave Halter
bf56103428
Update jedi/inference/imports.py
...
Co-authored-by: Peter Law <PeterJCLaw@gmail.com >
2020-10-21 22:32:24 +02:00
Dave Halter
78e87d0ab8
Relative imports should work even if they are not within the project
2020-10-20 01:00:22 +02:00
Dave Halter
9d1587a41d
Don't need to inherit from object anymore
2020-07-26 00:11:57 +02:00
Dave Halter
db0e90763b
Start using pathlib.Path instead of all the os.path functions
2020-07-10 17:30:36 +02:00
Dave Halter
0c1ba1b305
Move the importing of modules out of compatibility
2020-07-02 10:51:49 +02:00
Dave Halter
49e4b1a0f8
Remove force_unicode
2020-07-02 01:47:21 +02:00
Dave Halter
f9a35ae42a
Remove FileNotFoundError compatibility
2020-07-02 01:05:13 +02:00
Dave Halter
23db298e2f
Removed various 3.3/3.4/3.5 references
2020-07-02 00:34:27 +02:00
Dave Halter
344fef1e2f
Add Project.path, fixes #1622
2020-06-27 02:18:31 +02:00
Dave Halter
91857c2c0a
Fix issues with iter_module_names
2020-03-11 00:19:40 +01:00
Dave Halter
cf3d83ee4f
Don't mix up caches for stubs and python files
2020-03-09 17:48:36 +01:00
Dave Halter
7247c32990
Refactor load_module_from_path to be simpler
2020-03-09 17:40:14 +01:00
Dave Halter
75ae73ee97
Load -stubs packages properly in _load_python_module
2020-03-09 17:27:51 +01:00
Dave Halter
53f39c88e4
Try to fix a few more stub issues in search
2020-03-08 15:02:00 +01:00
Dave Halter
a5f7412296
Load stub modules if it's a stub
2020-03-08 11:51:39 +01:00
Dave Halter
f147cb1133
Make it possible to get stdlib modules for project search
2020-03-07 19:42:27 +01:00
Dave Halter
c159b9debd
Get namespace package searches working
2020-03-07 17:14:47 +01:00
Dave Halter
14ac0512a9
Get rid of cwd modifications in tests
2020-02-06 01:47:39 +01:00
Dave Halter
8ff2ea4b38
Make sure to not load unsafe modules anymore if they are not on the sys path, fixes #760
2020-01-31 13:09:28 +01:00
Dave Halter
28027a3fee
Remove a few imports
2020-01-20 16:59:22 +01:00
Dave Halter
26f0fa9eb0
Move get_module_contexts_containing_name to the references module
2020-01-17 22:51:09 +01:00
Dave Halter
4fb595f422
Remove NestedImportModule, because it hasn't been used in years
2020-01-12 13:42:50 +01:00
Dave Halter
ea0972d7ac
Make sure to check the module cache before loading a module (again)
...
This hopefully results in some performance improvements (maybe numpy?).
2020-01-05 18:28:34 +01:00
Dave Halter
bf446f2729
Add a completion cache for numpy/tensorflow, fixes #1116
2020-01-05 18:13:24 +01:00
Dave Halter
66ad620692
Get rid of a lot of flake8 errors
2020-01-01 02:42:31 +01:00
Dave Halter
c45c8ec8ef
Get some pytest fixtures working with some side effects
2019-12-27 01:04:01 +01:00
Dave Halter
a4a0d482a2
Make sure modules for dynamic searches are not checked twice
2019-12-25 03:53:45 +01:00
Dave Halter
eca8278eef
Fix an error recovery goto issue, fixes davidhalter/jedi-vim#962
2019-12-23 10:09:45 +01:00
Dave Halter
6e2a76feb9
Fix a goto case with nested pyi files
2019-12-15 17:37:24 +01:00
Dave Halter
76e0e6a8c5
Fix some more package issues
2019-12-01 20:42:55 +01:00
Dave Halter
7b6405f76c
Get rid of py__package__ from contexts
2019-12-01 19:33:24 +01:00
Dave Halter
e81c241905
Remove Python 2 implicit relative imports feature
...
Python 2 is almost gone, so I don't support those old features anymore.
2019-12-01 00:45:08 +01:00
Dave Halter
b895924311
Merge pull request #1451 from pappasam/FIX_SHOW_SYSTEM_FOLDERS
...
Fix: no longer shows folders recursively to root
2019-12-01 00:12:51 +01:00
Dave Halter
86071dda54
Use a different sys path for import completions and import type inference
...
Fix tests of the #1451 pull request
2019-12-01 00:12:19 +01:00
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
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
41dc514546
Enable a sys path test that is working now
2019-08-25 13:20:37 +02:00
Dave Halter
6d361e03ac
Avoid import recursions in other ways
2019-08-24 02:06:57 +02:00
Dave Halter
337c03e5be
Separate infer_import and goto_import a bit better
2019-08-22 00:23:24 +02:00
Dave Halter
bf4d42798b
Make separate methods for goto_import and infer_import
2019-08-21 23:58:26 +02:00
Dave Halter
2fb04db0ab
Fix the weird py__path__ behavior
2019-08-21 23:08:42 +02:00
Dave Halter
592f3771fc
Make Importer.module_context Importer._module_context
2019-08-21 09:56:36 +02:00
Dave Halter
6142d18206
More rename
2019-08-21 09:53:48 +02:00
Dave Halter
85f8f2a764
Fix os path resolving issues
2019-08-21 00:22:34 +02:00