1
0
forked from VimPlug/jedi
Commit Graph

56 Commits

Author SHA1 Message Date
Dave Halter
a59e5a016f Actually use the fast_parser setting again 2018-07-05 21:31:03 +02:00
Dave Halter
4075c384e6 In some very rare cases it was possible to get an interpreter crash because of this bug. Fixes #1087 2018-04-23 21:26:51 +02:00
Dave Halter
9b17be9ecf Cleanup some of the module cache stuff 2018-04-10 19:16:18 +02:00
Dave Halter
90a226f898 All modules now have a code_lines attribute, see #1062 2018-03-16 10:20:26 +01:00
Dave Halter
d986c44b94 Merge with master
The deprecation of Python2.6 and the insertion of environments made it quite difficult to merge.
2018-01-20 19:32:59 +01:00
Dave Halter
16b463a646 Refactor to avoid having unicode decode errors by default 2018-01-19 19:23:11 +01:00
Dave Halter
19b3580ba7 Get rid of some potential issues when using pandas interactively
The issue was that the python_object passed in was not hashable. Since it's not
used anyway and it doesn't make sense there, just ignore it.

Fixes #916, #875
2018-01-18 19:54:20 +01:00
Hugo
8cf708d0d4 Remove redundant parentheses 2018-01-07 10:40:06 +02:00
Dave Halter
f09ca9fc20 Use access handles everywhere 2017-12-06 14:46:27 +01:00
Dave Halter
543f4f7ff2 Move some stuff from compiled to context 2017-11-29 01:03:01 +01:00
Dave Halter
ba0768bab6 Refactor a bit more and remove the parent_context parameter from create_from_access 2017-11-29 00:24:28 +01:00
Dave Halter
cce9a1cf6a Use create only for non access objects 2017-11-28 21:15:55 +01:00
Dave Halter
accf20226d Fix a few more tests 2017-11-26 22:07:13 +01:00
Dave Halter
85ce57a863 Creating objects works now a bit better but is a huge mess. 2017-11-26 18:26:02 +01:00
Dave Halter
e71f0062dd Get a lot of tests passing 2017-11-26 17:48:00 +01:00
Dave Halter
3c75f27376 Move the base Context stuff to another module to keep context free for imports. 2017-09-30 16:46:07 +02:00
Dave Halter
8f177eea07 Move the ModuleContext to a separate module. 2017-09-29 13:24:48 +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
b74c8cb033 To be able to customize ContextSet, move a subclass to evaluate.context 2017-09-27 09:20:58 +02:00
Dave Halter
ee52cc7501 Fix most dynamic array issues. 2017-09-26 17:26:33 +02:00
Dave Halter
0c01a3b823 The sys.modules implementation did not work properly with newly created files.
Fixes #886.
2017-09-20 10:06:02 +02:00
Dave Halter
4b4b2c2122 Fix a small issue surrounding old school classes in Python 2. 2017-09-17 02:09:39 +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
e85000b798 Replace memoize_default with two nicer functions. 2017-09-05 18:46:16 +02: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
b90589b62e Some changes because parso has changed. 2017-05-22 15:42:42 -04:00
Dave Halter
f35f1b9676 Add the cache_path parameter to parso calls. 2017-05-20 10:08:48 -04:00
Dave Halter
9bca3d39f5 Actually use parso now instead of Jedi. 2017-05-19 14:20:14 -04:00
Élie Gouzien
a78769954d Check whether inspect.getfile will raise a TypeError and anticipate it.
Anticipate the raise of TypeError from inspect.getfile to prevent the computation of repr() for the error message wich is not used.
Useful for some big pandas arrays.
Fix tentative of #919.
2017-05-06 19:40:36 +02:00
Dave Halter
a0b65b52c6 used_names -> get_used_names(). 2017-04-12 08:56:11 +02:00
Dave Halter
eb37f82411 Add memoization where it needs to be. Fixes #894. 2017-04-05 01:06:48 +02:00
Dave Halter
47c1b8fa07 Fix bug #844. 2017-04-02 22:21:57 +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
63cafeaa87 Remove all usages of start_parsing=True in the fast parser. 2017-03-26 12:49:40 +02:00
Dave Halter
2cb565561d Replace the diff parser imports with the modified path. 2017-03-21 22:10:01 +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
425fba5e95 Move the parser.fast module to parser.diff. 2017-01-10 19:15:47 +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
9fb2644f03 Fix an issue with creating contexts. 2017-01-05 18:05:24 +01:00
Dave Halter
173c939956 Add a comment. 2016-12-17 14:29:53 +01:00
Dave Halter
6bccbb562a Fix some utils completions. 2016-12-17 14:25:52 +01:00
Dave Halter
9ac301d0c3 Refactor the mixed objects a bit to make at least some interpreter tests pass. 2016-12-16 17:17:03 +01:00
Dave Halter
a96eec8058 Fix an issue with mixed objects. 2016-09-27 01:28:42 +02:00
Dave Halter
885cf62a12 Remove the position_modifier from the parser. 2016-09-18 00:50:31 +02:00
Dave Halter
05ad8c6608 Start working on param autocompletion for the REPL. 2016-08-01 23:59:49 +02:00
Dave Halter
074a154af3 Fix a small issue that coul dhappen e.g. in stdin. 2016-07-06 08:05:50 +02:00
Dave Halter
2652666080 Remove the logic to not use getattr on instances in CompiledObjects. 2016-07-01 18:11:44 +02:00
Dave Halter
f7278f5bf1 Some more bug fixes for MixedObject. 2016-06-30 19:36:21 +02:00
Dave Halter
a3b263a599 REPL completion is working again partially. There's some progress at least. 2016-06-29 08:49:20 +02:00