Dave Halter
03e01631cc
Remove NamePart from existance and rename it to Name.
2014-09-26 16:29:53 +02:00
Dave Halter
19b32a3657
And by changing small things about NamePart/InstanceElement usage, we're finally able to pass the class tests again.
2014-09-24 15:42:44 +02:00
Dave Halter
f300e63dae
A couple of changes:
...
- parser.representation now uses ArrayStmt and ExprStatement to be able to differentiate easily with isinstance.
- NameParts are temporarily allowed again as InstanceElements.
2014-09-24 15:21:56 +02:00
Dave Halter
0a65eea2cf
Start to change the logic for self.foo variables.
2014-09-24 14:33:15 +02:00
Dave Halter
12e391c97a
Add a LazyDict to be able to use it within FunctionExecution for get_names_dict
2014-09-24 12:57:26 +02:00
Dave Halter
d5fbc006e2
Add a names_dict to scopes. This is good for the future parser and now useful to process self.foo and other stuff.
2014-09-24 12:44:24 +02:00
Dave Halter
dae1a48d70
Remove a lot of the old Name.names usages in favor of a direct NamePart usage.
2014-09-22 22:34:33 +02:00
Dave Halter
6bd7ef56f1
Now most tests pass and we're able to continue getting rid of parsing.representation.Name.
2014-09-22 15:41:27 +02:00
Dave Halter
c4e45916c6
Modules also use a NamePart as a name, now.
2014-09-22 12:52:48 +02:00
Dave Halter
fc5f73861c
Fix issues with the os module.
...
Using a try/finally assures that the recursion checkers work the right way.
2014-09-19 10:59:24 +02:00
Dave Halter
69e6139527
Goto on named params in class calls is now working.
2014-09-18 20:11:58 +02:00
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