1
0
forked from VimPlug/jedi
Commit Graph

104 Commits

Author SHA1 Message Date
Dave Halter
9f38f10366 fix tests. Operators should not equal to other operators with a different position. or even parent. 2014-08-18 13:13:07 +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
1540ac89f8 Implement the descriptor protocoll properly for instances. 2014-08-14 12:15:48 +02:00
Dave Halter
cf32e15f65 Remove the old 'is not' logic to detect if not instances and use them to do branch predictions. This is not necessary anymore, since we now support that in a more general way (flow_analysis). 2014-08-12 18:14:03 +02:00
Dave Halter
fb1dba269a re-enable the interpretation of the None keyword 2014-08-12 14:38:56 +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
1865284fa9 fix the interpreter (previously broken by flow analysis) 2014-08-12 00:19:20 +02:00
Dave Halter
f1711f8f9c possible direction of branch checks for name resolution. 2014-08-10 13:17:37 +02:00
Dave Halter
625e88e851 isinstance checks now also give you type hints in class contexts, fixes #241. 2014-08-04 02:11:30 +02:00
Dave Halter
7bba12e8c5 comments 2014-08-03 23:00:32 +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
15f42d93d7 it should be possible to find the origin of an operation, if it's a faulty one (static analysis) 2014-07-22 14:52:58 +02:00
Dave Halter
1fd7acef7a finally able to remove _get_defined_names_for_position 2014-07-03 11:53:51 +02:00
Dave Halter
c1ed3bf38a cleanup NameFinder.scopes, fully use scope_names_generator. 2014-07-03 11:48:26 +02:00
Dave Halter
ea370a083d more consequent usage of scope_names_generator 2014-07-03 11:41:33 +02:00
Dave Halter
a7e4d81692 also add scope_names_generator to the iterable module classes, as well as cleaning up some old scope_names_generator stuff 2014-07-02 18:58:31 +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
Dave Halter
3865c1a844 Fixed __file__ issues by always applying a ModuleWrapper in the global scope lookup. 2014-07-01 15:35:21 +02:00
Dave Halter
0b99473886 ExecutedParams should never be additionally faked, even if they are the first params. They have been legitimately created by a caller. 2014-06-30 15:22:53 +02:00
Dave Halter
1c9058ce6b Also issue warnings if setattr is used in a class instead of an error 2014-06-26 13:40:15 +02:00
Dave Halter
a936cea987 jedi issues now warnings instead of errors for AttributeErrors that happen in instances with __getattr__/__getattribute__ methods 2014-06-26 12:21:19 +02:00
Dave Halter
7e0edc4776 preparation for warnings in static analysis 2014-06-26 11:57:44 +02:00
Dave Halter
44238a9f92 submodules are automatically indexed without actually importing them. fixes #413.
However, this is not a 100% correct Python behavior. Python behavior would be to follow ALL imports in all modules (recursively) and check if the module was imported. However, that's a lot of work, that would slow down autocompletion. For now it's better to have no false positives in flaking and to ignore a few attribute errors.
2014-06-25 01:39:43 +02:00
Dave Halter
034a818863 repr improvements 2014-06-24 13:42:40 +02:00
Dave Halter
e106e4ffc8 fixed for loop in exception issue combined with usage of an exception variable 2014-06-22 23:32:07 +02:00
Dave Halter
401914e91c exception elements are always instances 2014-06-22 16:25:42 +02:00
Dave Halter
3e0f719915 changed the way how the dynamic param function searches it's parent scope, to enable smooth list comprehension following 2014-06-22 13:48:30 +02:00
Dave Halter
ddca14980e introduce an is_scope function to make it easier to work with scopes 2014-06-20 17:47:42 +02:00
Dave Halter
3ee3a04bcb fix list comprehension issues in nested parentheses. 2014-06-20 17:29:30 +02:00
Dave Halter
d5758adb2b fix list comprehensions. they were not implemented in a good way 2014-06-12 11:10:10 +02:00
Dave Halter
63868feb5d hasattr checks working now, #408 2014-06-10 16:08:53 +02:00
Dave Halter
af801ef9b4 make generator comprehensions work 2014-06-10 00:36:36 +02:00
Dave Halter
cd5b8aebfd fix issues with equal names before and after listcomprehension 2014-06-09 20:28:24 +02:00
Dave Halter
0b926ca454 get rid of is_list_comp boolean in favor of a direct check of ListComprehensionFlow 2014-06-09 20:19:31 +02:00
Dave Halter
acb4959a6a temporary very unfinished solution for the *args/**kwargs combination problem, if they are used in common with dynamic params. This doesn't solve the issue entirely, but it's at least a start and will probably solve all autocompletion issues. However, static analysis needs a little bit more than that. 2014-06-04 17:18:09 +02:00
Dave Halter
248cca2e5e fix issues with empty *args as inputs 2014-05-31 11:03:37 +02:00
Dave Halter
f57b53bbe2 check for 'if foo is not None' checks in the NameFinder. Solves the issues with the subprocess library. 2014-05-20 16:23:46 +02:00
Dave Halter
79556a7935 finder docstring and naming improvements 2014-05-20 15:17:07 +02:00
Dave Halter
ad762f674e renaming of an unclear variable 2014-05-20 14:01:43 +02:00
Dave Halter
08b48807e9 a (temporary) solution for the __file__ access issues in imported modules, see #408 2014-05-19 01:01:56 +02:00
Dave Halter
ecf9043d97 Improved error messages for AttributeErrors, however not a final version #408 2014-05-16 18:02:33 +02:00
Dave Halter
9bcc4f8fd2 static analysis is now able to tell the difference between NameError/AttributeError 2014-05-13 16:14:32 +02:00
Dave Halter
a2b483b4f5 None issue fix for static analysis 2014-05-13 01:21:32 +02:00
Dave Halter
b6ec589997 refactor general array lookup method get_index_types 2014-05-12 15:23:48 +02:00
Dave Halter
586ac9d013 removed a few debug things. 2014-05-10 20:31:33 +02:00
Dave Halter
11a445ab42 Merge branch 'dev' into linter 2014-05-10 16:53:41 +02:00
Dave Halter
60971245d6 star imports now have their own class, which will be important for AttributeError detection 2014-05-10 16:53:27 +02:00
Dave Halter
358472b21f improved star import support preparation 2014-05-10 14:12:36 +02:00
Dave Halter
7c965e544f dive further into following imports, etc 2014-05-08 11:26:08 +02:00