Dave Halter
1fb9b4bc6b
Completion now always takes a NamePart as input.
2014-09-10 18:59:08 +02:00
Dave Halter
657a2c7d4f
Trying to get the NameFinder to use only NameParts.
2014-09-10 16:20:30 +02:00
Dave Halter
b68a59daef
Fix the last remaining issues of the first part of the NamePart switch.
2014-09-09 15:58:20 +02:00
Dave Halter
45e033c50e
Quite a few fixes to be eventually able to use NameParts as Definition inputs.
2014-09-09 15:21:27 +02:00
Dave Halter
1199defabb
Start to use NameParts only in Definition contexts.
2014-09-09 14:13:10 +02:00
Dave Halter
cb84bc0829
Start using ExprStmt.
2014-09-06 10:46:59 +02:00
Dave Halter
f57d9ef675
Rename Name.get_parent_stmt to Name.get_definition, because it's not always a statement. Also start using it in the NameFinder.
2014-09-06 10:43:26 +02:00
Dave Halter
bb5ffe9343
CompiledObject.name returns a Name now, not a string. This is more consistent with the Jedi design and doesn't lead to bugs while ducktyping.
2014-09-03 19:43:21 +02:00
Dave Halter
76d91ba72a
Rename fast_parent_copy to deep_ast_copy.
2014-08-22 00:59:46 +02:00
Dave Halter
ed3b507ab7
cleanup
2014-08-22 00:47:08 +02:00
Dave Halter
039a5ecaf9
Fix issues caused by KeywordStatement, which needs to be copied as well.
2014-08-21 16:51:00 +02:00
Dave Halter
0ef030848d
refactor fast_parent_copy, use new_elements_default to hand in a dictionary, that contains all the generated duplicates.
2014-08-21 13:17:33 +02:00
Dave Halter
3cf8bfa8e1
Fix a few tests by either fixing the test cases or adding py__bool__ functions to objects that should have such a method.
2014-08-20 17:28:54 +02:00
Dave Halter
9abc8a19e7
By adding a py__class__ method to CompiledObject and Class, we Jedi is able to understand isinstance checks, now.
...
This also includes a CheckAttribute class in evaluatue.compiled, because it's way easier to generalize the AttributeErrors there.
2014-08-20 14:46:18 +02:00
Dave Halter
442a1a1d08
wrap some more values with er.wrap
2014-08-20 13:52:49 +02:00
Dave Halter
c9542cbc04
Start implementing an is_class function that will determine if an object is a class or not in the future.
2014-08-20 11:43:25 +02:00
Dave Halter
7f874620db
Start documenting all the py__foo__ methods
2014-08-20 11:31:23 +02:00
Dave Halter
fd90dfc4f5
Use a LazyName for module attributes, they should only be generated if needed.
2014-08-15 15:20:40 +02:00
Dave Halter
89ab0ba137
Fix fast_parent_copy. The caching is now more solid than before (and doesn't produce weird side effects. This also solves an issue with Lambdas. However, by fixing all of this we have broken some other things.
2014-08-15 01:55:43 +02:00
Dave Halter
f743619fb8
Tests for conditions in descriptors.
2014-08-13 14:49:42 +02:00
Dave Halter
ec7b3bf433
refactor py_base to py__bases__, because that's the general naming schema
2014-08-13 14:34:37 +02:00
Dave Halter
cd433adf84
Speedup object lookup even further in classes.
2014-08-13 14:17:57 +02:00
Dave Halter
9702c4cdc6
Restructure the way we get self arguments (probably reduces executions of object).
2014-08-13 14:07:09 +02:00
Dave Halter
33e5a3280a
Remove IsScope in favor of an is_scope function.
...
This function was partially implemented anway. Now we've also added a function called 'get_parent_scope', to make it easy to get a scope of a Call, Statement, whatever.
2014-08-12 01:19:19 +02:00
Dave Halter
242072976a
use py__mro__ in a classes scope_names_generator
2014-08-11 23:53:45 +02:00
Dave Halter
f1711f8f9c
possible direction of branch checks for name resolution.
2014-08-10 13:17:37 +02:00
Dave Halter
23c39eff9a
fix lambda issues
2014-08-06 12:40:08 +02:00
Dave Halter
e3bb0ccc2e
fix a keyword statement issue
2014-08-06 12:10:36 +02:00
Dave Halter
15ec0a77fe
a first very simple implementation of reachable/unreachable return statements.
2014-08-05 17:02:16 +02:00
Dave Halter
f5e49e3218
flow analysis preparation
2014-08-05 12:06:58 +02:00
Dave Halter
c44168f7ad
add a Flow.previous attribute to be able to access the if flow from an else clause.
2014-08-05 11:17:18 +02:00
Dave Halter
6e5d80a6b2
builtins shouldn't be unique if called by compiled.create
2014-08-01 15:51:59 +02:00
Dave Halter
d899f69686
simplify a lot of the current InstanceElement behavior, because we know now, that there's either a Statement or a Function inside (or maybe some other parser objects like an Array.
2014-07-31 13:41:10 +02:00
Dave Halter
0fbd5efefd
wrap instance element creation so that it only contains functions and statements, not CompiledObject or Instance.
2014-07-31 13:16:11 +02:00
Dave Halter
870abe73d4
Calling an InstanceElement of an Instance of CompiledObject doesn't raise an error anymore. Yes, it's really that complicated.
2014-07-30 19:49:41 +02:00
Dave Halter
723d1e4631
Nicer usage of py_call within InstanceElement and Python 2.7 compatibility
2014-07-30 17:00:16 +02:00
Dave Halter
7cc35fe0b8
remove a very old function call in FunctionExecution that had no effect
2014-07-30 16:41:02 +02:00
Dave Halter
cf63d20988
get rid of the evaluate_generator param
2014-07-30 16:36:27 +02:00
Dave Halter
565cfce2fe
Executable -> Executed
2014-07-30 16:00:38 +02:00
Dave Halter
7bd76022bf
get rid of the whole is_callable stuff, because now we can just check for hasattr(obj, 'py__call__')
2014-07-30 15:50:47 +02:00
Dave Halter
373ff2c45a
fix most issues related to the py__call__ stuff and generalize it.
2014-07-30 15:23:41 +02:00
Dave Halter
1e6a950aec
further progress in changing to py__call__
2014-07-30 14:40:56 +02:00
Dave Halter
ccd304bcb7
start switching to a more python similar approach of naming, start by naming execution stuff py__call__
2014-07-30 14:06:32 +02:00
Dave Halter
196afaacbf
always operate on class in super and not on an instance. that's the proper way.
2014-07-30 11:34:27 +02:00
Dave Halter
3c92d175da
using super() in actual executed classes wasn't possible. fixes #421
2014-07-30 11:27:27 +02:00
Dave Halter
53671bca84
replace get_super_classes with py_bases
2014-07-30 10:54:39 +02:00
Dave Halter
22e5574a91
Remove some get_defined_names methods, that are not needed anymore.
2014-07-03 12:12:50 +02:00
Dave Halter
ea370a083d
more consequent usage of scope_names_generator
2014-07-03 11:41:33 +02:00
Dave Halter
13ada3154b
replace get_defined_names with scope_names_generator in a lot of places (the cleanup still needs to be done, though).
2014-07-02 16:12:49 +02:00
Dave Halter
8d395a2ef1
scope_names_generator now works with modules perfectly well.
2014-07-02 12:41:16 +02:00