1
0
forked from VimPlug/jedi
Commit Graph

5838 Commits

Author SHA1 Message Date
Dave Halter
8131f19751 Correct an issue in the tests with the last commit. 2017-02-04 18:11:54 +01:00
Dave Halter
b6e61133d8 Move the tests for the last PR #848. 2017-02-04 18:11:14 +01:00
Mathias Rav
37d7b85ed1 Add tests for decorator completion 2017-02-04 18:05:15 +01:00
Mathias Rav
c6cd18802b Add myself as contributor 2017-02-04 18:05:15 +01:00
Mathias Rav
c809aad67f Complete dotted names properly in decorators
Outside decorators, a dotted name is parsed by the grammar as
stmt -> test -> power -> atom trailer -> (NAME) ('.' NAME)
where the first NAME is an 'atom' and the second NAME is a 'trailer'.

Thus, testing if the most recent variable is a 'trailer' and the most
recent node is a '.' is almost always enough for Jedi to properly
complete dotted names.

However, the grammar for decorators is more restricted and doesn't allow
arbitrary atoms and trailers; instead, a dotted name in a decorator is
decorator -> '@' dotted_name -> '@' (NAME '.' NAME),
meaning the most recent variable will be 'dotted_name', not 'trailer'.

Besides in decorators, the 'dotted_name' variable is only used in import
statements which are handled previously in _get_context_completions,
so checking for 'dotted_name' in this arm of the if only covers decorators
and not inadvertently anything else.
2017-02-04 18:05:15 +01:00
Dave Halter
1d64a5caa1 Replace first_leaf and last_leaf with get_first_leaf and get_last_leaf. 2017-02-03 17:35:53 +01:00
Dave Halter
90fffd883e Clean up the function docstring. 2017-02-03 17:30:58 +01:00
Dave Halter
647aec11a6 Return None instead of raising an IndexError in get_next_leaf. 2017-02-03 17:26:02 +01:00
Dave Halter
c5071f9f49 Change get_previous_leaf to return None if there is no leaf anymore (at the start of the file). 2017-02-03 17:23:15 +01:00
Dave Halter
445bf6c419 Get rid of get_parent_until. 2017-02-03 09:59:32 +01:00
Dave Halter
b3cb7b5490 Remove the def isinstance from the parser. It was a really bad pattern. 2017-02-03 09:37:59 +01:00
Dave Halter
6ccac94162 Add a deploy script. 2017-02-03 00:40:19 +01:00
Dave Halter
f2b41b1752 Update already the version number so we don't forget it. 2017-02-03 00:38:08 +01:00
Dave Halter
7020086166 Changelog for 0.10.0 v0.10.0 2017-02-03 00:08:51 +01:00
Dave Halter
8027aeebd8 Fix a small bug that was raised two commits ago (in the test suite). 2017-02-02 23:50:29 +01:00
Dave Halter
f627d541b8 Trying to fix the docs. 2017-02-02 23:39:10 +01:00
Dave Halter
a5a54fbc85 Fix a call signature issue. 2017-02-01 19:21:07 +01:00
Dave Halter
68a3a9cf41 Don't do anything with the diff parser if nothing changes. 2017-01-29 22:12:24 +01:00
Dave Halter
e5af996829 Remove old debug code from the diff parser. 2017-01-29 21:57:09 +01:00
Dave Halter
e0c8b3dd3b Fix an context issue in completions. 2017-01-29 19:09:35 +01:00
Dave Halter
3f1e658e1d Set the limit for debugging failed diff parsers a bit higher. 2017-01-29 14:34:20 +01:00
Dave Halter
40b6079ebd If an INDENT is the next supposed token, we should still be able to complete. 2017-01-29 14:06:22 +01:00
Dave Halter
b0f340748c So much work for one simple diff fail. 2017-01-29 00:42:09 +01:00
Dave Halter
b779677bf9 Merge branch 'dev' of github.com:davidhalter/jedi into dev 2017-01-25 23:21:45 +01:00
Dave Halter
b18239f9dd Add a way to profile the diff parser. 2017-01-25 23:00:33 +01:00
Dave Halter
9982975ad2 Another small performance improvement. 2017-01-25 22:54:08 +01:00
Dave Halter
4918fb49f5 Implement binary search for get_leaf_for_position. This makes it a lot faster. 2017-01-25 22:27:36 +01:00
Dave Halter
f2db0dceb4 A few small performances improvements on the diff parser. 2017-01-25 21:12:13 +01:00
Dave Halter
dfced86730 Merge pull request #834 from Carreau/fix-keyword
Fix keywords detected as modules
2017-01-24 13:27:49 +01:00
Dave Halter
551c122cf8 Fix an issue in sith where there we have accessed a removed Jedi property. 2017-01-24 09:57:43 +01:00
Dave Halter
f4b8a02d37 Add a few speed debugging times to the diff parser. 2017-01-24 09:51:23 +01:00
Dave Halter
09779c88aa Fix a nasty issue in the tokenizer. Fixes #836.
At the same time there was a related issue of not cleaning up newlines properly.
2017-01-24 00:50:37 +01:00
Dave Halter
741993a738 Merge branch 'dev' of github.com:davidhalter/jedi into dev 2017-01-23 20:37:34 +01:00
Dave Halter
e7fcc21863 Remove both MergedNodes and AlreadyEvaluated, they are unused. 2017-01-23 20:36:26 +01:00
Dave Halter
7623b1e350 Removed tree.is_node.
It's not needed anymore, because we have Node/Leaf.type now.
2017-01-23 20:34:30 +01:00
Dave Halter
64abe401ed The position modifier is not used anymore. 2017-01-23 20:12:17 +01:00
Dave Halter
d85ceb9222 More cleanups in the parser. 2017-01-23 20:10:02 +01:00
Dave Halter
645841d98c Remove more unused code. 2017-01-23 19:51:30 +01:00
Dave Halter
b286f3aef0 Merge pull request #832 from Carreau/more-docs
Improve some documentation about name_with_symbols, name and completion.
2017-01-23 15:00:45 +01:00
Dave Halter
01b25efea1 Use the same function to detect newlines in the diff parser. 2017-01-23 09:56:38 +01:00
Matthias Bussonnier
0f865a17ef Improve some documentation about name with symbols, name and completion. 2017-01-22 18:41:35 -08:00
Matthias Bussonnier
d3e8a9bd52 Resolve kewords types as keyword in completions
Closes #833
2017-01-22 18:39:32 -08:00
Dave Halter
1caa2ceafa Cannot use sys.version.major and minor names, because in Python 2.6 it's
not a namedtuple.
2017-01-23 01:09:01 +01:00
Dave Halter
8d2ec6556e Fix a Python 2.7 issue. 2017-01-23 00:36:57 +01:00
Dave Halter
1ff7ecc7af Remove jedi.settings.add_dot_after_module that was removed a while ago from documentation. 2017-01-23 00:12:02 +01:00
Dave Halter
194295066a Fix one more issue in the diff parser. 2017-01-22 23:44:10 +01:00
Dave Halter
08c66207ec Fix the last diff parser test. 2017-01-22 20:27:11 +01:00
Dave Halter
dca35393d5 Remove old code from the diff parser. 2017-01-22 20:22:20 +01:00
Dave Halter
8f4b862892 Fix most diff tests. 2017-01-22 20:13:18 +01:00
Dave Halter
005b24ed54 Better handling of the stack. 2017-01-21 18:43:54 +01:00