Commit Graph

2142 Commits

Author SHA1 Message Date
Dave Halter b2f6758a9c Merge pull request #1313 from CXuesong/master
get_module_names should include top-level async functions when all_scopes=False.
2019-04-13 00:43:58 +02:00
Andreas Mittelberger e843c6108d fix add_bracket_after_function had no effect (#1297)
* fix add_bracket_after_function had no effect

* added test for fix

* using monkeypatch to set add_bracket_after_function.
2019-04-13 00:41:02 +02:00
forest93 2724ac9e07 Make a separate test case. 2019-04-12 23:31:06 +08:00
forest93 1e12e1e318 Make get_module_names return top-level async functions when all_scopes=False. 2019-04-11 23:38:55 +08:00
Dave Halter 24a06d2bf9 Merge branch 'names-all-scopes-false-returns-class-fields' of https://github.com/immerrr/jedi 2019-04-09 22:58:03 +02:00
micbou 77a7792afc Fix transform_path_to_dotted tests on Windows
Convert paths to normalized absolute ones in transform_path_to_dotted
tests.
2019-03-16 17:34:00 +01:00
Dave Halter 92a8a84ff2 Fix sys.path completions, #1298 2019-03-13 21:11:20 +01:00
Dave Halter cd8c9436c5 Merge branch 'master' of github.com:davidhalter/jedi 2019-03-08 16:23:46 +01:00
Dave Halter f93134d4f8 Two simple test fixes 2019-03-08 16:23:37 +01:00
micbou 46742328b6 Improve test_import_completion_docstring robustness 2019-03-02 09:58:01 +01:00
Dave Halter ffd9a6b484 Make it possible to complete in non-Python files 2019-02-28 20:04:17 +01:00
Dave Halter 8aca357de6 Write a test for #1209
Relative imports were failing in nested Python packages. With the fix to
transforming paths to dotted paths this should already be a lot better,
still here's a regression test.
2019-02-28 09:51:47 +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 17136e03d2 Fix get_parent_scope 2019-02-27 13:08:21 +01:00
Dave Halter 94f2677752 Fix names selection and params, fixes #1283 2019-02-26 00:20:33 +01:00
Dave Halter eac69aef2b Infer names in the correct way, fixes #1286 2019-02-25 21:48:57 +01:00
Dave Halter 5a2e3ee8e3 Filter self names in a more correct way, fixes #1275 2019-02-25 00:26:34 +01:00
Dave Halter a79d386eba Cleanup SameEnvironment and use the same logic for creation in virtualenvs 2019-02-22 00:24:55 +01:00
Dave Halter b4a4dacebd Fix embedded Python with Jedi (see comments in source code), fixes davidhalter/jedi-vim#870 2019-02-21 10:19:28 +01:00
oleg.hoefling 4711b85b50 used pytest.param to comply with pytest>=4 2018-12-07 17:49:39 +01:00
micbou 368bf7e58a Improve docstring formatting 2018-11-26 00:26:34 +01:00
immerrr 3f5ac0cf56 test_param_docstring: use all_scopes=True to ensure param is extracted 2018-10-18 14:47:20 +03:00
immerrr a8401f6923 Add failing test for jedi.api.names(..., all_scopes=False) 2018-10-18 13:54:33 +03:00
Jelte Fennema 3bdb941daa Add an exact_key_items method to DictComprehension fixes #1233 2018-10-14 17:08:44 +02:00
Dave Halter 23b3327b1d Fixed completions of global vars and tensorflow slowness, fixes #1228, #1116 2018-10-02 15:28:51 +02:00
Dave Halter 862f611829 If the VIRTUAL_ENV variable changes, need to reload the default environment, fixes #1201, #1200 2018-09-30 19:07:48 +02:00
Dave Halter 6a2a2a9fa1 Fix an issue with f-strings, fixes #1224 2018-09-30 13:26:54 +02:00
Claude a2b984ce24 also remove crashes with pep 448 unpacking of lists and sets 2018-09-23 21:00:11 +02:00
Claude 6bc79b4933 Fixed crash (and now recognises correctly) {**d, "b": "b"}["b"] 2018-09-23 21:00:11 +02:00
Claude b9127147e4 Recognize {**d} as a dict instead of set 2018-09-23 21:00:11 +02:00
Daniel Hahler 56bd795100 _get_virtual_env_from_var: use safe=False
Without this creating an env from VIRTUAL_ENV will always silently fail
if it is not the same/current environment.
2018-09-16 11:37:22 +02:00
Daniel Hahler cdb760487b tests: venv_path: use session scope 2018-09-16 11:24:27 +02:00
Hugo 7c9f24a18e Drop support for EOL Python 3.3 (#1019) 2018-08-04 00:40:00 +02:00
Dave Halter 9ca7b30e38 Rewrite the pyc test 2018-08-03 23:59:55 +02:00
Dave Halter 95a1a69771 Fix an issue where __ prefixed variables where not hidden when accessed from a class
Everything worked well when looking at it from an instance perspective.
2018-08-03 11:05:49 +02:00
Dave Halter 1a4be5c91c Bound methods are now working correctly in all Python versions. Therefore a test was wrong. 2018-08-03 00:25:25 +02:00
Dave Halter 40d3abe2b2 Remove a print in tests 2018-08-03 00:25:25 +02:00
Dave Halter e7a019e628 The implicit namespace package test from 4b276bae87 can only be used for Python 3.4+ 2018-07-21 11:51:41 +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 a408fb3211 Fix a recursion error, fixes #1173 2018-07-18 10:01:41 +02:00
Dave Halter 3cabc4b969 Remove two recursion tests again that will belong into a commit at a point where it is not failing anymore 2018-07-17 18:34:42 +02:00
Dave Halter 733919e34c Fix a doctest 2018-07-17 00:47:42 +02:00
Daniel Hahler 08fa7941ce tests: use monkeypatch.setenv 2018-07-12 22:04:25 +02:00
Dave Halter d06e55aab5 The sys path might be lazy or not in a venv 2018-07-10 10:07:18 +02:00
Dave Halter cef769ecd8 The encoding parameter should be used again (includes test), fixes #1167 2018-07-09 18:25:28 +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 2500112f6c Don't follow builtin imports anymore by default when follow_imports is on (goto) 2018-07-04 00:01:03 +02:00
Dave Halter d857668292 Add include_builtins to usages, fixes #1131. 2018-07-03 22:53:19 +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
Dave Halter 5b7984c4d4 Test auto_import_modules in a very basic way 2018-07-02 09:57:18 +02:00