Dave Halter
95930d293c
Move instance module to the context package.
2017-09-29 15:14:56 +02:00
Dave Halter
65ef6a3166
Move py__getitem__ to the context module.
2017-09-28 14:10:32 +02:00
Dave Halter
30df79e234
Rename py__iter__types to iterate_contexts.
2017-09-28 13:19:33 +02:00
Dave Halter
47c249957d
Make BuiltinMethod a Context object.
2017-09-28 12:04:44 +02:00
Dave Halter
d9d3aeb5bc
Move more functions to the syntax tree module.
2017-09-28 09:16:43 +02:00
Dave Halter
0782a80cef
Move all the search to py__getattribute__ and remove find_types.
2017-09-27 19:22:50 +02:00
Dave Halter
9073f0debc
Use the typical ordering of arguments for ClassContext.
2017-09-27 19:16:05 +02:00
Dave Halter
d584b698b7
Move eval_element and eval_stmt to the syntax tree module.
2017-09-27 18:14:04 +02:00
Dave Halter
b997b538a7
Move eval_atom to the syntax tree module.
2017-09-27 16:27:37 +02:00
Dave Halter
5415a6164f
Starting to try to move some functions away from Evaluator.
...
This time eval_trailer.
2017-09-27 16:21:02 +02:00
Dave Halter
313e1b3875
Use a different way of executing functions.
2017-09-27 16:07:24 +02:00
Dave Halter
025951089a
Some conversions of eval_element -> eval_node.
2017-09-27 15:17:11 +02:00
Dave Halter
b74c8cb033
To be able to customize ContextSet, move a subclass to evaluate.context
2017-09-27 09:20:58 +02:00
Dave Halter
00f2f9a90c
Fix the final issues with the ContextSet refactoring.
2017-09-26 18:17:19 +02:00
Dave Halter
592f2dac95
A lot more fixes for tests.
2017-09-26 16:29:07 +02:00
Dave Halter
174eff5875
Replace a lot more of empty sets and unite calls.
2017-09-25 23:08:59 +02:00
Dave Halter
5328d1e700
Add a ContextSet.
...
This is not bug free yet, but it's going to be a good abstraction for a lot of small things.
2017-09-25 11:04:09 +02:00
Dave Halter
a433ee7a7e
Move common to evaluate.utils.
2017-09-20 20:33:01 +02:00
Dave Halter
96ad254fcc
Typo.
2017-09-17 02:15:49 +02:00
Dave Halter
8fcb468539
Jedi was able to go crazy and loop endlessly in certain if/self assignment combinations.
...
Here we limit type inferance per tree scope. I'm still not sure this is the way
to go, but it looks okay for now and we can still go anther way in the future.
Tests are there.
Fixes #929 .
2017-09-17 02:04:42 +02:00
Dave Halter
9dd2027299
Way better support for instantiated classes in REPL
...
Fixes several issues:
- It was not possible to correctly trace where instances were coming from in a
REPL. This led to them being pretty much ignored.
- Instances were then just treated as classes and not as actual instances in
MixedObjects. (However since they were ignored in the first place this
wasn't really an issue).
- Avoiding the repr bug https://github.com/python/cpython/pull/2132/files in
Jedi is working a bit differently. We're just never accessing Objects
directly. This should work around 99.99% of the cases were people are using
this stuff.
Fixes #872
2017-09-15 01:55:18 +02:00
Dave Halter
619acbd2ca
Goto didn't work well on imports in __init__.py files.
...
Fixes #956 .
2017-09-11 21:48:37 +02:00
Dave Halter
2f213f89e5
Remove code that was scheduled for removal.
2017-09-09 17:58:06 +02:00
Dave Halter
e85000b798
Replace memoize_default with two nicer functions.
2017-09-05 18:46:16 +02:00
Dave Halter
f69d8f1f29
_get_definition -> get_definition in parso.
2017-09-03 00:50:52 +02:00
Dave Halter
4795ed9071
More refactoring.
2017-09-03 00:39:15 +02:00
Dave Halter
6fb2f73f88
Some more refactorings.
2017-09-03 00:37:20 +02:00
Dave Halter
b64690afb8
Param defaults were not correctly followed when goto was used on them.
2017-09-03 00:22:59 +02:00
Dave Halter
333babea39
get_definition has now a new option.
2017-09-02 23:56:00 +02:00
Dave Halter
747e0aa7c4
Remove a get_definition usage.
2017-09-02 23:23:09 +02:00
Dave Halter
4a04bf78c7
Move some code around.
2017-09-02 22:45:23 +02:00
Dave Halter
9663e343c2
Almost the last switch to _get_definition.
2017-09-02 22:42:01 +02:00
Dave Halter
7e4504efbd
Fix ellipsis issues of python2.
2017-07-16 20:07:49 +02:00
Dave Halter
e0485b032e
Fix some stuff to make parso work again.
2017-06-02 00:00:31 +02:00
Dave Halter
24cd603fcf
Some more parso adaptations.
2017-05-26 09:08:34 -04:00
Dave Halter
3f36824a94
Parso changed load_python_grammar to load_grammar.
2017-05-25 12:41:19 -04:00
Dave Halter
cd8932fbfc
Add a latest grammar to the evaluator and use it to avoid importing from parso import parse.
2017-05-24 00:37:36 -04:00
Dave Halter
9bca3d39f5
Actually use parso now instead of Jedi.
2017-05-19 14:20:14 -04:00
Dave Halter
536e62e67d
Move is_scope and get_parent_scope out of the parser.
2017-05-07 14:58:53 +02:00
Dave Halter
336b8a46d0
search_ancestor now uses *node_types as a parameter instead of a mix of tuple and simple string like isinstance.
2017-05-02 19:19:07 +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
d6d25db9a2
Remove __str__ from name.
2017-04-12 23:06:11 +02:00
Dave Halter
6190a65f23
The Lambda type should be lambdef, not lambda. Use the grammar types.
2017-04-11 18:28:25 +02:00
Dave Halter
685e630c03
Simple refactoring.
2017-04-11 18:20:44 +02:00
Dave Halter
afa6427861
Fix the remaining lambda issue.
2017-04-11 18:18:31 +02:00
Dave Halter
218e715553
Make the some names more concise in the parser tree.
2017-04-10 09:44:08 +02:00
Dave Halter
f855c2bb70
More parser tree simplifications.
2017-04-09 13:24:17 +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
3a6d815e9e
Another conversion.
2017-04-01 18:12:53 +02:00
Dave Halter
281d6a87a0
Remove a few print statements.
2017-04-01 12:43:57 +02:00