Dave Halter
703b747a31
Deal with annotation on *args and **kwargs correctly, fixes #980
2019-07-23 23:56:30 +02:00
Dave Halter
ff149b74e0
Use LazyContextWrapper more
2019-07-23 13:59:08 +02:00
Dave Halter
3d08eb92d5
Very small refactoring
2019-07-23 13:08:57 +02:00
Johannes-Maria Frank
02d16ac55c
Fix for failing assertion on native modules Issue #1354 ( #1370 )
2019-07-23 13:02:08 +02:00
Dave Halter
c7fc715535
Use class filters in instances differently so metaclass plugins work, fixes #1090
2019-07-18 11:20:54 +02:00
Dave Halter
dea887d27d
Refactor the plugin registry
2019-07-16 12:48:54 +02:00
mwchase
925fc89447
Get typing.NewType working ( #1344 )
...
Squashed from the following commits:
* Update pep0484.py
(I don't think I want to know why the cursor jumped to the beginning of the line with every keystroke in GitHub's online editor. Change was entered backwards.)
* Added test for inline use of NewType. Currently assuming that wrapped instances should get the underlying type.
* Altered tests per https://github.com/davidhalter/jedi/issues/1015#issuecomment-356131566
* Add NewTypeFunction to typing evaluation module
* Update AUTHORS.txt
* Add a new test, and a speculative justification
For now, address only the second comment
* Copy code from third comment on the PR
From inspection, I *believe* I understand what this code is doing, and as such, I believe this should cause the new test I added in response to the second comment to fail, because that test is based on faulty assumptions.
* Explicitly discard the key from the tuple
* Update pep0484_typing.py
* Test for the wrapped type, not the wrapper "type"
* Change the return value from calling a NewType
2019-07-01 22:42:59 -07:00
Dave Halter
a9ff58683e
Fix ClassVar filter for instances
2019-06-26 22:56:30 +02:00
Dave Halter
3ddbee1666
Fix issues for socket
2019-06-15 02:07:30 +02:00
Dave Halter
fc20faf8f8
Remove _apply_qualified_name_changes, because it's really not needed
2019-06-15 01:58:54 +02:00
Dave Halter
e61949da66
Fix some collections.deque issues
2019-06-15 01:56:49 +02:00
Dave Halter
3ed30409ea
Some progress in trying to make the deque work
2019-06-14 09:36:23 +02:00
Dave Halter
5ef0563abe
Don't use stub_to_python_context_set anymore
2019-06-10 19:39:26 +02:00
Dave Halter
56d8945d17
Use convert_context function for docs lookup
2019-06-10 19:17:50 +02:00
Dave Halter
7f3e55df02
Fix conversion for contexts
2019-06-10 18:56:37 +02:00
Dave Halter
95f3aed82c
Eliminate more actual appearances
2019-06-10 16:16:34 +02:00
Dave Halter
8ba3e5d463
Change some names from actual -> python
2019-06-10 16:02:05 +02:00
Dave Halter
c8937ccdbf
Add only_stubs and prefer_stubs as parameters to goto_assignments/goto_definitions
2019-06-10 15:59:12 +02:00
Dave Halter
a555def6ca
Use a different function signature instead of a separate goto_stubs function
2019-06-10 02:27:22 +02:00
Dave Halter
eef02e5c56
Fix generator issues for typing
2019-06-08 01:50:38 +02:00
Dave Halter
da4e6f275e
Fix stub lookups for MixedObject
2019-06-05 19:46:40 +02:00
Dave Halter
bade4e661f
Some changes to get stubs working better for mixed objects
2019-06-03 20:28:04 +02:00
Dave Halter
b9e8bff5e2
Start using FileIO in modules
2019-05-31 22:10:49 +02:00
Dave Halter
9c40c75136
Add file_io for Jedi for listdir
2019-05-31 21:25:48 +02:00
Dave Halter
946869ab23
Fix tests
2019-05-28 01:59:32 +02:00
Dave Halter
ec7b6b8d80
Fix stub function inferrals
2019-05-28 01:51:37 +02:00
Dave Halter
6f41530a03
Very small refactoring
2019-05-27 23:57:23 +02:00
Dave Halter
1002acf907
Rename AnnotatedClass to GenericClass
2019-05-27 21:21:42 +02:00
Dave Halter
d2355ea53b
Remove dead code
2019-05-27 21:12:08 +02:00
Dave Halter
bee9bd7621
given_types -> generics
2019-05-27 21:08:19 +02:00
Dave Halter
5a6d8ba010
Implement typing.cast
2019-05-27 20:59:04 +02:00
Dave Halter
9bb88b43ca
Fix stub_to_actual_context_set for bound methods
2019-05-22 10:35:04 +02:00
Dave Halter
ea490b9a2b
Remove remap_type_vars, which was never used
2019-05-19 16:15:52 +02:00
Dave Halter
05a3d7a3bc
Remove _create_class_filter, it was unused
2019-05-19 14:06:21 +02:00
Dave Halter
dc2f4e06c8
Fix a few casts for Python 2/3 interopability
2019-05-18 20:51:42 +02:00
Dave Halter
4176af337f
A few Python 2 fixes
2019-05-18 01:09:09 +02:00
Dave Halter
0fb5fd271a
Better scanning for module names, now includes namespace packages and stubs
2019-05-18 00:11:08 +02:00
Dave Halter
c640aa9213
goto_assignments should work even if something is only defined in a stub
2019-05-17 14:58:55 +02:00
Dave Halter
b5d1e00930
Deal better with instance conversions for stubs
2019-05-17 12:27:53 +02:00
Dave Halter
f53c977069
Fix an issue with stub conversion
2019-05-16 00:52:14 +02:00
Dave Halter
051db30dfb
Proper loading for third-party stub packages
2019-05-16 00:45:09 +02:00
Dave Halter
e4170d65b7
Make namespace folders work with stubs
2019-05-15 21:55:54 +02:00
Dave Halter
b7eeb60e9c
Move stub caching around
2019-05-15 21:10:35 +02:00
Dave Halter
7fc7e631f8
Move a part of stub lookups
2019-05-15 21:06:36 +02:00
Dave Halter
0e95aaeaad
A first try to load foo-stub directories
2019-05-15 08:19:46 +02:00
Dave Halter
dcbc60e1f0
Add a docstring to mention PEP 561
2019-05-14 21:12:34 +02:00
Dave Halter
03f29c51cf
Improve stub loading from random places
2019-05-14 21:09:20 +02:00
Dave Halter
5ff3e4d1d1
Implement stub tests and a first iteration of loading them from some random place
2019-05-13 10:13:59 +02:00
Dave Halter
409bf907d9
Fix os path imports
2019-05-10 10:08:14 +02:00
Dave Halter
de7b638e6c
Remove StubClass, it should really not be needed anymore
2019-05-10 01:29:06 +02:00