1
0
forked from VimPlug/jedi
Commit Graph

912 Commits

Author SHA1 Message Date
Dave Halter 88cf198552 Avoid function executions if they are not necessary
This also means that annotations are prefered to docstring types
2019-08-24 12:23:33 +02:00
Dave Halter 4cbe2898c0 Fix usage tests
With those tests fixed, everything should pass again
2019-08-21 01:01:09 +02:00
Dave Halter 03920502c4 infer_state -> inference_state 2019-08-16 11:44:30 +02:00
Dave Halter ad4f546aca context -> value 2019-08-15 01:23:06 +02:00
Dave Halter a5dff65142 Evaluator -> InferState 2019-08-15 00:37:51 +02:00
Dave Halter 3b4f292464 Move the evaluate package to inference 2019-08-15 00:14:26 +02:00
Dave Halter 97526aa320 Add tests to show that #516 is not working, yet 2019-08-02 22:31:26 +02:00
Dave Halter 703b747a31 Deal with annotation on *args and **kwargs correctly, fixes #980 2019-07-23 23:56:30 +02:00
Dave Halter f4fe113c0f One test about recursion issues only applied to Python 2 2019-07-18 12:00:47 +02:00
Dave Halter eeea88046e First step in working with metaclasses in plugins, see #1090. 2019-07-18 11:20:28 +02:00
Dave Halter de138e9114 Improve a bit of dataclasses support, so at least the attributes can be seen
see #1213
2019-07-03 09:21:57 -07:00
Dave Halter 4c132d94b9 Make sure in tests that pep 0526 variables are also able to be used when using self, see #933 2019-07-01 23:34:28 -07:00
mwchase 925fc89447 Get typing.NewType working (#1344)
Squashed from the following commits:

* Update pep0484.py

(I don't think I want to know why the cursor jumped to the beginning of the line with every keystroke in GitHub's online editor. Change was entered backwards.)

* Added test for inline use of NewType. Currently assuming that wrapped instances should get the underlying type.

* Altered tests per https://github.com/davidhalter/jedi/issues/1015#issuecomment-356131566

* Add NewTypeFunction to typing evaluation module

* Update AUTHORS.txt

* Add a new test, and a speculative justification

For now, address only the second comment

* Copy code from third comment on the PR

From inspection, I *believe* I understand what this code is doing, and as such, I believe this should cause the new test I added in response to the second comment to fail, because that test is based on faulty assumptions.

* Explicitly discard the key from the tuple

* Update pep0484_typing.py

* Test for the wrapped type, not the wrapper "type"

* Change the return value from calling a NewType
2019-07-01 22:42:59 -07:00
Dave Halter 1e3b6a201d Fix filters for classes and functions 2019-07-01 22:24:29 -07:00
Dave Halter a9ff58683e Fix ClassVar filter for instances 2019-06-26 22:56:30 +02:00
Dave Halter fafd6b2ac6 Keyword completions are no longer possible directly after a number, fixes #1085 2019-06-26 15:04:46 +02:00
Dave Halter 265abe1d08 Fix super call goto for multiple inheritance, fixes #1311 2019-06-24 09:53:56 +02:00
Dave Halter ebdae87821 goto should always goto definitions, fixes #1304 2019-06-24 01:25:26 +02:00
Dave Halter 907fdaa153 Fix some minor errors 2019-06-20 09:53:40 +02:00
Jean Cavallo a3afdc0ece Ignore super calls when super class cannot be inferred 2019-06-12 09:51:08 +02:00
Dave Halter 827a79861d Add tests for positional only params 2019-06-09 22:56:20 +02:00
Dave Halter c8d658e452 A first very incomplete implementation of named expression support 2019-06-03 00:11:49 +02:00
Dave Halter d6c89ced99 goto should work on globals 2019-05-31 17:41:34 +02:00
Dave Halter d9332aec8c Fix tuple unpacking for special case 2019-05-31 17:07:51 +02:00
Dave Halter 3fb5b4992b Fix: Function calls with generators should always work, even if syntastically invalid 2019-05-31 13:35:23 +02:00
Dave Halter 9a713bc36f Fix create_context for param default arguments/annotations 2019-05-31 00:21:35 +02:00
Dave Halter df038d8f05 Modules are obviously not executable, but should not lead to traceback when executed 2019-05-30 00:17:38 +02:00
Dave Halter 0cc7ea9bc9 Fix crazier subscript operations 2019-05-28 10:20:06 +02:00
Dave Halter 5fa8338886 Enable a test that is kind of xfailing 2019-05-28 01:55:22 +02:00
Dave Halter ec7b6b8d80 Fix stub function inferrals 2019-05-28 01:51:37 +02:00
Dave Halter 5a6d8ba010 Implement typing.cast 2019-05-27 20:59:04 +02:00
Dave Halter 8e27c60120 Fix async function inferring with decorators, fixes #1335 2019-05-27 09:47:05 +02:00
Dave Halter 4176af337f A few Python 2 fixes 2019-05-18 01:09:09 +02:00
Dave Halter 4b829c358b Fix an import names completion issue 2019-05-17 23:34:17 +02:00
Dave Halter 02ab71ff26 Tests for stub import completions 2019-05-17 16:53:34 +02:00
Dave Halter e70c49fea2 Use completions from both stubs and actual modules 2019-05-17 16:04:16 +02:00
Dave Halter c640aa9213 goto_assignments should work even if something is only defined in a stub 2019-05-17 14:58:55 +02:00
Dave Halter 9d5f57d798 Make sure inferring works even if a stub doesn't have all variables defined 2019-05-17 14:45:22 +02:00
Dave Halter 4f64dd30f9 Make sure Python is still loadable in stub only folders 2019-05-15 22:23:23 +02:00
Dave Halter 904c4d04bb Make sure Python is still loadable in mixed stub/python folders 2019-05-15 22:20:57 +02:00
Dave Halter f49d48fbd2 Add a few more tests for nested stub folders 2019-05-15 22:18:22 +02:00
Dave Halter e4170d65b7 Make namespace folders work with stubs 2019-05-15 21:55:54 +02:00
Dave Halter 5ff3e4d1d1 Implement stub tests and a first iteration of loading them from some random place 2019-05-13 10:13:59 +02:00
Dave Halter aa37f6f738 Fixes for _follow_error_node_imports_if_possible 2019-03-28 10:12:23 +01:00
Dave Halter 2ad652a071 Fix a few more goto_definition error_node imports 2019-03-28 09:34:57 +01:00
Dave Halter 1c105b5c68 Follow error node imports properly in goto assignments as well 2019-03-27 00:53:35 +01:00
Dave Halter f4c17e578c Make it possible to use goto_definition on "broken" imports 2019-03-27 00:39:51 +01:00
Dave Halter 2a9e678877 Merge branch 'master' into typeshed 2019-02-27 13:13:17 +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 1c80705276 Fix power operation, fixes #1268 2018-12-25 00:51:22 +01:00