1
0
forked from VimPlug/jedi
Commit Graph

1770 Commits

Author SHA1 Message Date
Dave Halter 26cce4d078 Add the grammar as an argument to saving the parser.
This makes collisions of different grammars when loading from the cache impossible.
2017-03-22 18:32:49 +01:00
Dave Halter 2cb565561d Replace the diff parser imports with the modified path. 2017-03-21 22:10:01 +01:00
Dave Halter 52d855118a Remove get_parsed_node from the parser as well. 2017-03-18 03:55:23 +01:00
Dave Halter 0f66a3c7a8 Remove the module attribute from the parser. 2017-03-18 03:53:34 +01:00
Dave Halter 448bfd0992 Move the python parser tree. 2017-03-16 17:20:32 +01:00
Dave Halter 06702d2a40 Move the python parser. 2017-03-16 08:40:19 +01:00
Dave Halter 93f14157a6 Cleanup the ParseError stuff. 2017-03-15 18:41:58 +01:00
Dave Halter 375749c5c3 Small restructuring. 2017-03-15 08:56:49 +01:00
Dave Halter 97fc3bc23c Refactored the parser calls. Now it's possible to use jedi.parser.python.parse to quickly parse something. 2017-03-14 00:38:58 +01:00
Dave Halter a7b1e3fe70 Fixed another diff parser error. 2017-03-12 15:58:14 +01:00
Dave Halter 6e3b00802c Another endless while loop issue, add an assert. 2017-03-11 14:54:44 +01:00
Dave Halter 818fb4f60c Fix a bug that might have caused an endless while loop a while ago. Fixes #878. 2017-03-09 21:47:16 +01:00
Dave Halter c7a74e6d1c Make the tokenizer a generator. 2017-03-09 18:53:09 +01:00
Dave Halter 989e4bac89 Speed up splitlines.
We use the python function again with the modifications we need.
I ran it with:

    python3 -m timeit  -n 10000 -s 'from jedi.common import splitlines; x = open("test_regression.py").read()'

The speed differences are quite remarkable, it's ~3 times faster:

    10000 loops, best of 3: 52.1 usec per loop

vs. the old:

    10000 loops, best of 3: 148 usec per loop

We might need to speedup splitlines with  as well. It's probably
also a factor 2-3 slower than it should be.
2017-03-09 08:58:57 +01:00
micbou a859add6d7 Only resolve names for actual modules
A name can be part of an import statement without being a module.
2017-03-01 21:06:21 +01:00
Matthias Bussonnier 784de85b36 Add test for handeling of newline in multiline strings 2017-02-24 00:05:38 +01:00
daniel 5513f72987 added support for implicit ns packages and added tests 2017-02-23 23:53:14 +01:00
Matthias Bussonnier b72aa41019 Missing assert 2017-02-08 23:40:23 +01:00
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
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 e0c8b3dd3b Fix an context issue in completions. 2017-01-29 19:09:35 +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 dfced86730 Merge pull request #834 from Carreau/fix-keyword
Fix keywords detected as modules
2017-01-24 13:27:49 +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 01b25efea1 Use the same function to detect newlines in the diff parser. 2017-01-23 09:56:38 +01:00
Matthias Bussonnier d3e8a9bd52 Resolve kewords types as keyword in completions
Closes #833
2017-01-22 18:39:32 -08:00
Dave Halter 194295066a Fix one more issue in the diff parser. 2017-01-22 23:44:10 +01:00
Dave Halter 005b24ed54 Better handling of the stack. 2017-01-21 18:43:54 +01:00
Dave Halter fe44458ec0 Start implementing the node stack. 2017-01-16 16:32:49 +01:00
Dave Halter ad1222e6d7 Fix another parser bug. 2017-01-12 08:46:58 +01:00
Dave Halter 425fba5e95 Move the parser.fast module to parser.diff. 2017-01-10 19:15:47 +01:00
Dave Halter 1edccbe2c3 Improve literal tests. 2017-01-08 19:52:21 +01:00
Dave Halter 7300f3e7ef Fix issues with Python 3.6's f strings and underscores in numbers. 2017-01-08 19:39:14 +01:00
Dave Halter 00a9f1ec0a Update the tokenizer to include f literals and underscores. Need tests still. 2017-01-08 16:03:45 +01:00
Dave Halter 3f09f3a304 Add support for PEP 0526.
This makes it possible to assign variables like

    asdf: typing.List[int] = []
2017-01-08 03:57:35 +01:00
Dave Halter 6d00a5702f If newer versions are using Jedi (e.g. at the moment Python 3.7), it shouldn't just result in a grammar issue, just because that grammar doesn't not exist. Just take the Python 3.6 grammar instead. 2017-01-07 15:54:04 +01:00
Dave Halter aff3950085 Better async testing. 2017-01-07 15:40:55 +01:00
Dave Halter 6a18ddf8cb Fix await issues. At the moment Jedi is just ignoring await statements. 2017-01-07 15:27:32 +01:00
Dave Halter ae8e43d3c7 Move get_node() to tree_node and replace all the custom classdefs/funcdefs. 2017-01-05 23:43:12 +01:00
Dave Halter 89ec207f49 Add a failing test for an inheritanc context completion issue. 2017-01-05 21:50:15 +01:00
Dave Halter 9fb2644f03 Fix an issue with creating contexts. 2017-01-05 18:05:24 +01:00
Dave Halter 12a9ef48f7 Move the completion tests. 2017-01-04 22:34:43 +01:00
Dave Halter 9341df11bf Fix the issues that were changed by removing start_pos from the api classes. 2017-01-04 22:24:25 +01:00
Dave Halter e96fd32588 Fix an issue of params completion signatures. 2017-01-04 22:09:08 +01:00
Dave Halter 55ec47f15f Test module attributes. 2017-01-04 18:32:16 +01:00
Dave Halter 01099ce5a9 Create a name for the generators. 2017-01-04 18:12:33 +01:00