Commit Graph

2299 Commits

Author SHA1 Message Date
Takafumi Arakaki
17f5b9a79d Fix test failure in Python 3.3
There is a new method introduced in Python 3.3:
http://docs.python.org/3/library/datetime.html#datetime.datetime.timestamp
2013-05-04 18:10:20 +02:00
Takafumi Arakaki
89edb73978 Fix failure due to rebase 2013-05-04 17:58:02 +02:00
Takafumi Arakaki
3d0458bca9 Export Interpreter class to top-level namespace 2013-05-04 17:50:42 +02:00
Takafumi Arakaki
e8914e7856 Document api.Interpreter 2013-05-04 17:45:34 +02:00
Takafumi Arakaki
8fc396371c Respect settings.fast_parser 2013-05-04 17:44:59 +02:00
Takafumi Arakaki
c2e9ccda2b Fix failing test: args for ModuleWithCursor 2013-05-04 17:44:59 +02:00
Takafumi Arakaki
dc47d15de0 Use locals() for tests in TestInterpreterAPI
It is better to check that Interpreter does not fail with the
real name space.  Previously the doctest using locals() failed
because of the bug in _import_raw_namespace.
2013-05-04 17:44:59 +02:00
Takafumi Arakaki
a93016db1b Python 2.5 compatibility fix 2013-05-04 17:44:59 +02:00
Takafumi Arakaki
af10891096 Document api.Interpreter._genname 2013-05-04 17:44:59 +02:00
Takafumi Arakaki
fc79f0e258 Support case like from os.path import join as pjoin 2013-05-04 17:44:59 +02:00
Takafumi Arakaki
6fb42e5f4b Document _import_raw_namespace more 2013-05-04 17:44:59 +02:00
Takafumi Arakaki
12ac71b1fd Document api.Interpreter 2013-05-04 17:44:59 +02:00
Takafumi Arakaki
b4e3d1d65d Fix test_complete_raw_instance example
'dt.strftime("%Y").up' does not work even if with `api.Script`.
Change it to the one that can be handled by Jedi.
2013-05-04 17:44:59 +02:00
Takafumi Arakaki
45cad4c83b Fake imports should locate before fake statements 2013-05-04 17:44:59 +02:00
Takafumi Arakaki
06c03cafa2 Implement the case where raw object is an instance
There is still a bug in this implementation.
The corresponding test fails.
2013-05-04 17:44:58 +02:00
Takafumi Arakaki
11abd92d2b Support alias in _make_fakeimport 2013-05-04 17:44:58 +02:00
Takafumi Arakaki
cf48d1272d Use proper interface to add fake Import object 2013-05-04 17:44:58 +02:00
Takafumi Arakaki
17770356e2 Implement the case where raw object is a module
Previously failing test_complete_raw_module is passed.
2013-05-04 17:44:58 +02:00
Takafumi Arakaki
fb197c42ab Add tests for api.Interpreter (2/3 fail) 2013-05-04 17:44:58 +02:00
Takafumi Arakaki
3266aa2d00 Improve api.Interpreter docstring 2013-05-04 17:43:37 +02:00
Takafumi Arakaki
842fbfce8a Add api.Interpreter: Jedi API for Python REPLs 2013-05-04 17:43:37 +02:00
David Halter
ae0dd1d72c fix docstr issue in the wrong place, fixes #210 2013-05-04 19:51:42 +04:30
David Halter
2e0d0bb4f5 test for #210 2013-05-04 13:44:15 +04:30
David Halter
698ee7af28 removed an old part_parser test 2013-05-03 21:35:28 +04:30
David Halter
4d0417f591 change some definition usages to goto_definitions in tests and docs 2013-05-03 21:35:01 +04:30
David Halter
7c8fee1257 removed a lot of the goto usages, used goto_assignments instead. Did the same also for a lot of definition uses 2013-05-03 21:26:29 +04:30
David Halter
edd0a08351 api_classes.RelatedName -> Usage 2013-05-03 21:06:56 +04:30
David Halter
efeeee9706 removed related_names occurences in favor of usages 2013-05-03 21:04:36 +04:30
David Halter
860cc5de04 make api_classes.BaseDefinition._definition private 2013-05-03 20:56:07 +04:30
David Halter
5d472e99ac more variables private in the same file 2013-05-03 20:51:24 +04:30
David Halter
150b7fc1d5 make some variables of the Completion class private 2013-05-03 20:41:18 +04:30
David Halter
49e51f5a1a deprecated api_classes.Completion.word in favor of name 2013-05-03 20:38:37 +04:30
David Halter
beae920177 Script.complete has been deprecated, therefore changed all usages / documatation to Script.completions 2013-05-03 20:28:11 +04:30
David Halter
c912428f78 deprecation process for a nice api design (as discussed in #124)
deprecate:

- definition
- goto
- complete
- related_names
- function_definition

in favor of:

- goto_definitions
- goto_assignments
- completions
- usages
- call_signatures

Thank you @dbrgn and @tkf for the fruitful discussion!
2013-05-03 20:15:36 +04:30
David Halter
c0bb6ff04b even more deletions (clean up for last commit) 2013-05-03 19:35:51 +04:30
David Halter
88e60b85e0 best patch in a long time, deleted all the part_parser stuff which was necessary for fast function_definitions, but with the new parser Jedi's fast enough -> fixes #136 2013-05-03 19:33:24 +04:30
David Halter
a2da599d6e fix a completion in dict problem 2013-05-03 18:31:05 +04:30
David Halter
55d2b19cc0 get rid of UncaughtAttributError, fixes #191 2013-05-03 17:22:48 +04:30
David Halter
4865505215 getattr is now also allowed on modules, fixes #116 2013-05-03 17:00:07 +04:30
David Halter
1d45105461 flows in classes shouldn't be a problem anymore, fixes #183 2013-05-03 16:29:34 +04:30
David Halter
fd4eb5f0a6 add test of #183 2013-05-03 15:16:09 +04:30
David Halter
c37515f938 included test from #162 (seems to be working), fixes #162 2013-05-03 15:01:30 +04:30
David Halter
300d43de19 PEP 3148 module formatting, fixes #207 2013-05-03 14:17:48 +04:30
David Halter
cc520530c0 changed module name checking (should only be in one place) 2013-05-03 14:09:46 +04:30
David Halter
da067c5c38 add _module to BaseDefinition api 2013-05-03 14:04:40 +04:30
David Halter
902e197c4e bump _ModulePickling number 2013-05-03 13:26:25 +04:30
David Halter
88f39a01cb Merge pull request #208 from davidhalter/fast
New improved Fast Parser
2013-05-02 14:11:05 -07:00
David Halter
6204cb740b merge with dev branch 2013-05-03 01:28:50 +04:30
David Halter
302d06de85 fix end_pos stuff in parser (no (None, None) end_pos anymore 2013-05-03 01:14:41 +04:30
David Halter
4bb4176296 fixed a position problem 2013-05-02 18:56:22 +04:30