Dave Halter
c8caa8f4ac
Use a class stub class
2018-08-01 10:47:46 +02:00
Dave Halter
c196075cb8
Actually use the stub function
2018-08-01 01:42:09 +02:00
Dave Halter
dfbd1f8772
Mix stub name with non-stub names in a better way
2018-07-31 23:25:13 +02:00
Dave Halter
b5670fdc5f
Some progress in working with typeshed
2018-07-31 11:33:38 +02:00
Dave Halter
cdb96bff47
Avoid recursion issues for the typing module
2018-07-29 00:10:54 +02:00
Dave Halter
35361f4edc
Add debug warnings when a user runs into a recursion error
2018-07-29 00:03:43 +02:00
Dave Halter
9bba91628a
Annotations can contain forward references even if they are not a string anymore
...
Since Python 3.7 this behavior can be imported with from future import __annotations
2018-07-28 16:35:24 +02:00
Dave Halter
b073b05aa0
Fix a bug in the typeshed implementation
2018-07-28 14:50:02 +02:00
Dave Halter
e6f28b06b5
A bit better typeshed support
2018-07-28 14:39:55 +02:00
Dave Halter
4e75a35468
Fix stub searching for nested modules
2018-07-27 10:14:37 +02:00
Dave Halter
e827559340
Get some first stubs working
2018-07-25 23:48:53 +02:00
Dave Halter
6bcac44050
Add another stub file test
2018-07-25 11:44:48 +02:00
Dave Halter
ee43fd7579
Start testing the typeshed directory search
2018-07-25 11:37:03 +02:00
Dave Halter
b809768934
Start implementing some typeshed details
2018-07-25 11:00:51 +02:00
Dave Halter
1739ae44f0
Refactor some of the import logic so it's possible to load typeshed modules
2018-07-24 01:19:09 +02:00
Dave Halter
f72f3f3797
Better flake8 configuration
2018-07-24 00:50:31 +02:00
Dave Halter
18f26a0c04
Change a module is None check to raise an Exception
2018-07-23 23:57:27 +02:00
Dave Halter
873558a392
Move the os.path hack
2018-07-23 23:04:14 +02:00
Dave Halter
c88afb71c9
Import names are now always strings
2018-07-23 22:40:24 +02:00
Dave Halter
27ab4ba339
Add the flask plugin and move the import hacks there
2018-07-23 04:04:21 +02:00
Dave Halter
8a9202135b
Move import logic around a bit
2018-07-23 03:54:10 +02:00
Dave Halter
7711167052
Start enabling the Typeshed plugin, even though it doesn't do anything, yet.
2018-07-23 02:40:18 +02:00
Dave Halter
e7635b40d5
Remove some unused code
2018-07-22 18:02:53 +02:00
Dave Halter
f5cbb5de49
Some refactoring in the stdlib plugin
2018-07-22 03:49:36 +02:00
Dave Halter
2cd1ae73ed
Move stdlib content to the stdlib plugin
2018-07-22 03:45:02 +02:00
Dave Halter
061489ec9a
Move the stdlib executions into a plugin
2018-07-22 03:38:12 +02:00
Dave Halter
df55f62ad8
Add a plugin infrastructure
2018-07-21 15:03:05 +02:00
Dave Halter
7d2b7bb3c1
Add typeshed as a submodule
2018-07-21 09:50:25 +02:00
Dave Halter
4b276bae87
The import resolution for namespace packages was wrong
...
With this change we can now include all parents of the script, which will make
relative imports always work.
Now the whole meta_path is scanned and not just importlib's PathFinder.
Fixes #1183 .
2018-07-21 00:16:10 +02:00
Dave Halter
ad5170a37a
Add a way to use the interpreter environment for tests
2018-07-20 19:16:02 +02:00
Dave Halter
d292333dab
MergedExecutedParams -> DynamicExecutedParams
2018-07-18 10:02:57 +02:00
Dave Halter
a408fb3211
Fix a recursion error, fixes #1173
2018-07-18 10:01:41 +02:00
Dave Halter
3cabc4b969
Remove two recursion tests again that will belong into a commit at a point where it is not failing anymore
2018-07-17 18:34:42 +02:00
Dave Halter
fb360506fb
Don't merge params if it's just one param
2018-07-17 09:53:26 +02:00
Dave Halter
fe1799d125
Add a repr for AnonymousArguments
2018-07-17 09:48:27 +02:00
Dave Halter
733919e34c
Fix a doctest
2018-07-17 00:47:42 +02:00
Daniel Hahler
10b61c41f4
Some minor flake8 fixes
2018-07-16 23:41:42 +02:00
Daniel Hahler
08b0b668a6
Script.__repr__: include environment
2018-07-16 13:26:10 +02:00
Daniel Hahler
72a8ceed76
Add params to CallSignature.__repr__
...
Looks like this for `jedi.Script` then:
> <CallSignature: Script index=0 params=[source=None, line=None, column=None, path=None, encoding='utf-8', sys_path=None, environment=None]>
`_params_str` could be made public, and then could be used in jedi-vim,
which currently has this:
params = [p.description.replace('\n', '').replace('param ', '', 1)
for p in signature.params]
08792d3fd7/pythonx/jedi_vim.py (L492-L493)
2018-07-16 13:23:38 +02:00
Dave Halter
1e796fc08d
Environments are now always created on request
...
The issue was that if something changed about the environment (e.g. version
switch) or sys.path change, re-creating the environment was possible, but did
not involve the change. The environments have now a __del__ function that
deletes the subprocess after every time an Environment is garbage collected.
2018-07-15 17:49:17 +02:00
Daniel Hahler
2fc91ceb64
Improve Environment
...
It only takes `executable` and gets all the information from the
subprocess directly.
Fixes https://github.com/davidhalter/jedi/issues/1107 .
2018-07-15 17:49:17 +02:00
Dave Halter
f6bc166ea7
Add max line length 100 to the config for flake8
2018-07-13 09:25:51 +02:00
Daniel Hahler
08fa7941ce
tests: use monkeypatch.setenv
2018-07-12 22:04:25 +02:00
Dave Halter
3a62d54403
Don't test Python 3.3 on appveyor anymore, it's getting really hard to get all the right dependencies for it, because 3.3 is deprecated everywhere.
2018-07-12 21:21:40 +02:00
Dave Halter
748946349f
Mention that it's ok to have a line length of 100 characters in our files.
2018-07-12 21:18:54 +02:00
Dave Halter
71cea7200b
Don't use invalid escape sequences in regex, see https://github.com/davidhalter/jedi-vim/issues/843
2018-07-12 21:13:26 +02:00
Daniel Hahler
87d7c59c6e
subprocess: listen: exit normally with EOFError
...
This is an expected case, since the parent closed normally, and
therefore the subprocess should exit with 0.
2018-07-11 12:56:55 +02:00
Daniel Hahler
f3c1f4c548
Script: improve ValueError for column
...
Ref: https://github.com/davidhalter/jedi/issues/1168
2018-07-11 12:55:18 +02:00
Dave Halter
d06e55aab5
The sys path might be lazy or not in a venv
2018-07-10 10:07:18 +02:00
Dave Halter
cef769ecd8
The encoding parameter should be used again (includes test), fixes #1167
2018-07-09 18:25:28 +02:00