1
0
forked from VimPlug/jedi
Commit Graph

95 Commits

Author SHA1 Message Date
Dave Halter c4e45916c6 Modules also use a NamePart as a name, now. 2014-09-22 12:52:48 +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 18204c4c19 By trying to get rid of search_name in usages, we had to fix an issue with imports:
If used like 'follow(is_goto)', it could return a ModuleWrapper instead of a Name, which is what we actually want.
2014-09-03 19:30:00 +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 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 09ca47fa93 Introduce a dedicated isinstance function implementation. 2014-08-19 23:57:59 +02:00
Dave Halter 425290aa8f Fix an issue with partial keyword inputs. 2014-08-14 12:25:00 +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 8ed89e8245 implement !=, ==, is, is not operators to work in if statements (they also work in in non if contexts and return a bool value.), includes tests. 2014-08-12 17:59:19 +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 242072976a use py__mro__ in a classes scope_names_generator 2014-08-11 23:53:45 +02:00
Dave Halter e7e7bd29e8 fix generator tests (multiple yields must be called with an if random. 2014-08-06 12:45:38 +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 6e5d80a6b2 builtins shouldn't be unique if called by compiled.create 2014-08-01 15:51:59 +02:00
Dave Halter 59b8c6b015 CompiledObjects should execute everything when reading the return information from docstring (because it's always types, not values) 2014-07-31 17:16:24 +02:00
Dave Halter 50fa3a732d actually start checking if the integration tests are instances on both sides of the comparison. This wasnt necessary for just autocompletion, but it's way more important now. 2014-07-31 14:58:32 +02:00
Dave Halter 0851e7667e A module shouldn't be callable. 2014-07-30 17:07:57 +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 1e6a950aec further progress in changing to py__call__ 2014-07-30 14:40:56 +02:00
Dave Halter 852cdad754 Operator fixes. Subclass of Simple, now. 2014-07-22 16:02:34 +02:00
Akinori Hattori 2696d95d70 fix dotted_from_fs_path for Windows 2014-07-19 10:33:08 +09: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 5b7c869323 types also add to completions, also for compiled objects. removed a few lines of code that complicated the process as well. 2014-06-28 12:09:43 +02:00
Dave Halter d444ef9e15 setdefault fix 2014-06-26 15:23:20 +02:00
Dave Halter 47205dd7f3 change the implementation of compiled.load_module and always use the sys.modules cache after an import, because it's easier. Doesn't require any logic. 2014-06-25 18:57:07 +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 ea271c8047 replace _sre fake module literals with undefined types. 2014-06-20 11:18:54 +02:00
Dave Halter a373818965 fix function execution mutable list issue 2014-06-16 17:12:27 +02:00
Dave Halter 4e596060b9 test for is_nested failure 2014-05-16 13:00:13 +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 6bec7ce847 speed up Builtin lookups 2014-04-25 14:12:28 +02:00
Dave Halter c790f88678 speed up precedences. 2014-04-25 13:28:01 +02:00
Dave Halter ff810d9ece cache compiled.CompiledObject.defined_names attribute, improves test suite performance by 20%, numpy by more than 50%. Awesome! 2014-04-14 02:20:22 +02:00
Dave Halter 3fced34544 the last commit featured an incomplete caching for compiled objects. The current one should improve this. 2014-04-13 21:55:29 +02:00
Dave Halter 4bc55be103 significant speedup due to compiled caching 2014-04-13 16:31:38 +02:00
Dave Halter 27645af6d2 make a slow inspect.getdoc() call lazy, which improves performance for numpy completions by 30% 2014-04-11 11:53:11 +02:00
Dave Halter d2dc39e0c2 also allow unicode, bytes, bytearray, dict -> fixes #297 2014-04-07 16:16:31 +02:00
Dave Halter 193e04ae8e get rid of side effects in the interpreter if trying to use the index on an iterable (using __getitem__) 2014-04-07 16:11:23 +02:00
Dave Halter 79e2ec85cc implement slicing for __getitem__ with interpreter 2014-04-04 15:09:25 +02:00
Dave Halter a6fbcde184 more detailed tests and implementation of array indexing in the interpreter 2014-04-04 13:22:12 +02:00
Dave Halter 50ef3c7fa3 implement __getitem__ access for CompiledObject 2014-04-04 12:59:16 +02:00
Dave Halter b8987fe451 CompiledObject.get_index_types implementation example 2014-04-03 19:05:29 +02:00
Dave Halter edb0bbd183 use defined_names also for modules, fixes symbol browsing issues - fixes #344 2014-04-02 13:48:27 +02:00
Dave Halter 305b593f3b create an is_callable method for all representation objects, to determine if something is callable or not 2014-04-02 09:42:15 +02:00
Dave Halter 72aa7f918f the type of a compiled object is also function, not def 2014-04-01 14:45:05 +02:00
Dave Halter 2ae5dad78b fix Definition.name API for params 2014-03-13 22:48:02 +01:00
Dave Halter eaa56c47cc compiled params didn't have a param 2014-03-13 12:49:37 +01:00