Dave Halter
9bca3d39f5
Actually use parso now instead of Jedi.
2017-05-19 14:20:14 -04:00
Dave Halter
84d8279089
Import.paths -> Import.get_paths.
2017-05-07 15:47:34 +02:00
Dave Halter
63679aabd9
Replace Param.get_description with get_code and a parameter include_coma.
2017-05-01 02:19:42 +02:00
Matthias Bussonnier
6f1ee0cfa8
Use stacklevel in warnings or filters don't work.
...
In particular with the right stacklevel IPython will display the warning
if code is directly entered by the user. Without this info it does not.
Use the opportunity to add in the warning since when things are
deprecated. This leads to one less lookup of information for the user.
2017-04-29 20:13:19 +02:00
Dave Halter
7ca62578e1
Add py__doc__ as a better approach to docstrings.
2017-04-20 09:45:15 +02:00
Dave Halter
b4631d6dd4
Progress in removing the docstring/call signature logic from the parser.
2017-04-18 18:48:05 +02:00
Dave Halter
deb028c3fb
Move get_statement_of_position out of the parser tree.
2017-04-15 02:23:08 +02:00
Dave Halter
a0b65b52c6
used_names -> get_used_names().
2017-04-12 08:56:11 +02:00
Dave Halter
545cb26f78
stars -> star_count.
2017-04-08 15:26:57 +02:00
Dave Halter
65a6c61dc6
Remove nodes_to_execute in favor of a function in parser_utils.
2017-04-08 12:59:49 +02:00
Dave Halter
632072000e
Fix the builtin docstring issue that we've had. Fixes #859 .
2017-04-03 00:27:31 +02:00
Andy Lee
1624f6945e
Fix api.usages so it finds cross-module usages
2017-04-01 15:52:22 +02:00
Dave Halter
a6829ca546
Use the cache variables in more straight forward fashion.
2017-03-31 23:10:39 +02:00
Dave Halter
1bb0c89f46
Remove source parameter from parser.
2017-03-31 21:44:43 +02:00
Dave Halter
35fd1c70bd
Rename parser.utils to parser.cache.
2017-03-30 01:57:48 +02:00
Dave Halter
8059c3c2c8
Save a module instead of a parser when pickling.
2017-03-30 00:55:04 +02:00
Dave Halter
932703f04a
Remove an import that is not needed anymore.
2017-03-28 02:09:38 +02:00
Dave Halter
ee47be0140
Merge Parser and ParserWithRecovery.
2017-03-28 02:08:16 +02:00
Dave Halter
6a9c2f8795
Start using ContextualizedNode for py__iter__.
2017-03-28 01:34:07 +02:00
Dave Halter
8a35a04439
Remove the module path from the parser tree.
...
Some static analysis tests are still failing.
2017-03-27 18:13:32 +02:00
Dave Halter
b60ec024fa
Remove start_parsing completely from the Parsers.
2017-03-26 12:52:37 +02:00
Dave Halter
7874026ee5
A lot of work toward a better diff parser API.
2017-03-25 01:51:03 +01:00
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
9dedb9ff68
Don't start parsing in our own API.
2017-03-20 08:44:52 +01:00
Dave Halter
0f66a3c7a8
Remove the module attribute from the parser.
2017-03-18 03:53:34 +01:00
Dave Halter
d0b6d41e99
Remove the old star import cache, because it's not even used.
2017-03-18 03:30:23 +01:00
Dave Halter
4573ab19f4
Separate the python syntax tree stuff from the non python stuff.
2017-03-16 19:54:08 +01:00
Dave Halter
448bfd0992
Move the python parser tree.
2017-03-16 17:20:32 +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
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
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
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
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
a5a54fbc85
Fix a call signature issue.
2017-02-01 19:21:07 +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
dfced86730
Merge pull request #834 from Carreau/fix-keyword
...
Fix keywords detected as modules
2017-01-24 13:27:49 +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
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
425fba5e95
Move the parser.fast module to parser.diff.
2017-01-10 19:15:47 +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
ae8e43d3c7
Move get_node() to tree_node and replace all the custom classdefs/funcdefs.
2017-01-05 23:43:12 +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
0caeef2589
Remove the deprecated start_pos.
2017-01-04 18:23:41 +01:00
Dave Halter
cd23499fbe
Fix param issues in goto definition.
2017-01-04 08:58:29 +01:00