Danilo Bargen
86d775324b
Fix most flake8 issues ( fixes #205 )
2013-04-27 15:40:36 +02:00
Danilo Bargen
f98b0d7b6f
New "with ignored(*exceptions)" context manager
2013-04-17 23:28:37 +02:00
Takafumi Arakaki
2cc6edfa7c
Fix Completion.follow_definition
2013-03-16 22:57:31 +01:00
David Halter
cd513590ab
Merge pull request #176 from tkf/basedefinition-type
...
More detailed BaseDefinition.type (fixes #169 )
2013-03-15 10:36:53 -07:00
Takafumi Arakaki
f791e96d9d
Fix failing test_basedefinition_type
2013-03-15 13:54:19 +01:00
Takafumi Arakaki
f70e425c4a
Lowercase the str returned by BaseDefinition.type
2013-03-15 13:08:55 +01:00
David Halter
7b6a4c9a2b
some corrections of imports
2013-03-15 16:01:23 +04:30
David Halter
9ad9c806bb
rename non-cycling imports to 'from jedi import ..'
2013-03-15 15:02:33 +04:30
Takafumi Arakaki
7cf70a3f0a
Do not clear cache in __del__
...
Prior to this change, running
`py.test --assert=rewrite test/test_integration.py` fails with errors
due to:
```py
cls = <class 'jedi.recursion.ExecutionRecursionDecorator'>
@classmethod
def cleanup(cls):
> cls.parent_execution_funcs.pop()
E IndexError: pop from empty list
recursion.py:127: IndexError
```
Similar errors occurred in travis occasionally:
- https://travis-ci.org/davidhalter/jedi/jobs/5449831
- https://travis-ci.org/davidhalter/jedi/jobs/5512538
I think this is because GC calls __del__ at random point during
actual execution of ExecutionRecursionDecorator.__call__.
As --assert=rewrite works by AST dynamically, I guess that it
is harder for Python's GC to clean up code and therefore GC
happens sometime later. Although this is just a random guess,
as `tox -- --assert=rewrite` works with this patch now, I think
this is a good change.
2013-03-15 00:21:46 +01:00
David Halter
fbbdc50bb0
Merge pull request #164 from tkf/doc-api-classes
...
Document api_classes
2013-03-14 09:20:38 -07:00
Takafumi Arakaki
dccda224ab
Hide api_classes.defined_names
2013-03-13 22:18:50 +01:00
Takafumi Arakaki
8d54ebea7b
Fix BaseDefinition.module_name
2013-03-13 22:05:59 +01:00
Takafumi Arakaki
125a3b1a6b
Document BaseDefinition.module_name
2013-03-13 22:05:31 +01:00
Takafumi Arakaki
2f7797f867
Ignore known failure in BaseDefinition.description doctest
...
See: #162
2013-03-13 21:44:55 +01:00
Takafumi Arakaki
a449428391
Document BaseDefinition.full_name
2013-03-13 20:30:36 +01:00
Takafumi Arakaki
9e3e6a2eea
Document BaseDefinition.description
2013-03-13 20:29:02 +01:00
Takafumi Arakaki
41b33fd460
Document BaseDefinition.doc
2013-03-13 20:11:14 +01:00
Takafumi Arakaki
f9ed3d42f7
Document BaseDefinition.type
2013-03-13 20:01:43 +01:00
Takafumi Arakaki
871ce5ad33
Compatibility fix for Python 2.5
2013-03-10 20:44:15 +01:00
Takafumi Arakaki
a02940f3c1
Rename api.get_definitions to defined_names
...
Do the same for Definition.get_definitions also.
2013-03-10 20:40:52 +01:00
Takafumi Arakaki
36f03f4b0d
Use the first item returned by get_names_of_scope
2013-03-10 20:40:52 +01:00
Takafumi Arakaki
06de4d66e7
Revert "Add get_names_of_scope option to evaluate.get_names_of_scope"
...
This reverts commit 154662ea273a17f00186546bdf9d75833553d307.
2013-03-10 20:40:52 +01:00
Takafumi Arakaki
d4bf14dd66
Use list comprehension instead of map
2013-03-10 20:40:52 +01:00
Takafumi Arakaki
5a29fecfb2
Fix Python 3 syntax error
2013-03-10 20:40:52 +01:00
Takafumi Arakaki
87714460a2
Add get_names_of_scope option to evaluate.get_names_of_scope
...
Previously failing test passes now.
2013-03-10 20:40:14 +01:00
Takafumi Arakaki
3fbe7e9ff4
Rewrite get_definitions using evaluate.get_names_of_scope
...
- Definition.names is changed to Definition.name.
- TestGetDefinitions.test_nested_definitions fails.
2013-03-10 20:40:14 +01:00
Takafumi Arakaki
1eccf2f765
Make sure get_definitions returns list in Python 3
2013-03-10 20:40:14 +01:00
Takafumi Arakaki
08f45d1f95
Fix Definition.get_definitions
2013-03-10 20:40:14 +01:00
Takafumi Arakaki
0f67b3e0c2
More robust Definition.names
2013-03-10 20:40:14 +01:00
Takafumi Arakaki
d0ad14adf4
Fix Definition.names for star import
2013-03-10 20:40:14 +01:00
Takafumi Arakaki
cbcaa85108
Add :attr:Definition.names
2013-03-10 20:40:14 +01:00
Takafumi Arakaki
39feecee04
Add new API: jedi.api.get_definitions
2013-03-10 20:40:14 +01:00
Takafumi Arakaki
95a98c9033
Do not use >>> for non-doctest code example
...
Use literal block instead.
2013-02-26 10:36:08 +01:00
David Halter
6ea64a28bf
dev/refactor merge
2013-02-23 20:53:57 +04:30
David Halter
b0c3fd5439
api.Script.get_definition -> definition, to be consistent in the api naming. deprecated api.Script.get_definition
2013-02-21 22:12:51 +04:30
David Halter
f8e0c78f77
Script.get_in_function_call -> Script.function_definition
2013-02-21 22:05:39 +04:30
Takafumi Arakaki
7f9eb272c4
Add '_sqlite3' to BaseDefinition._mapping
2013-02-09 01:32:53 +01:00
Takafumi Arakaki
44097bac22
Add 'posix' to BaseDefinition._mapping
...
Needed for "os.fsync", for example.
2013-02-09 01:32:43 +01:00
Takafumi Arakaki
ef30642f25
Add '_functools' to BaseDefinition._mapping
...
Needed for "functools.partial"
2013-02-09 01:30:30 +01:00
David Halter
69137a48f0
pep8
2013-02-06 13:04:27 +01:00
David Halter
56d900b7e2
moved recursion parts from helper to recursion.py
2013-02-05 23:41:54 +01:00
David Halter
1474dcb91c
other modules also adapt to the new evaluate_representation now
2013-02-05 17:09:57 +01:00
David Halter
bc08ea9630
renamed all occurences of parsing
2013-02-05 16:29:39 +01:00
David Halter
9f9bbaae56
no str cast on None for module paths
2013-01-04 20:16:13 +01:00
Danilo Bargen
a4e1fe47fd
Improved plugin api documentation
2013-01-02 20:10:59 +01:00
David Halter
71b50bdbd7
return None on keywords for BaseDefinition.full_name, fixes #94
2012-12-30 10:49:18 +01:00
David Halter
01220e047e
sphinx api_classes description
2012-12-29 20:44:07 +01:00
David Halter
1700b37f64
same_name_completions -> _same_name_completions, #97
2012-12-29 20:20:26 +01:00
David Halter
406233b62d
ignore duplicates of completion outputs, #97
2012-12-29 01:59:34 +01:00
Danilo Bargen
59ff88ab57
Proper sphinx deprecation warning
2012-12-27 18:52:56 +01:00