* Remove "typing." prefix from compiled signature param
* Don't print default "None" for Optional params
* Don't remove 'typing.' prefix if symbol doesn't come from typing module
* Revert "Don't print default "None" for Optional params"
This reverts commit 8db334d9bb.
* Make sure "typing." doesn't appear in the middle
* Make sure only "typing." prefix is removed and not it's entries in the middle
* Use inspect.formatannotation() to create an annotation string
* Update AUTHORS.txt
* Add test for compiled param annotation string
* Replace Optional in test with other typing facilities
in order for test to be forward-compatible with 3.9
* Add an empty string fallback for Python 2
* Move _annotation_to_str back to original position
* the cache directory should really be %LOCALAPPDATA%
* ~ is not a meaningful directory on Windows. It should really be
os.path.expanduser('~'). To be honest it is probably always safe to
assume that os.getenv('LOCALAPPDATA') executes to something sensible
on any Windows system that hasn't been tampered with.
* add detection of conda environments
* changed get_default_environment to look for conda
* updated comment on get_default_environment to mention CONDA_PREFIX
* added myself to authors
* simple fix for mistaken conda paths
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
* docstrings: fix "Sphinx param with type" pattern
Previously, the pattern only matched if the parameter description
followed on the same line, like so:
:param type foo: A param named foo.
However, it's also valid for the parameter description to be wrapped
onto the next line, like so:
:param type foo:
A param named foo.
This change updates the pattern to match the second example as well, and
adds a test to verify this behaviour.
Fixes#806.
* Add Simon Ruggier to the AUTHORS file
Source files can be in any coding system, provided Python can
read a coding: line at the beginning of the file. So source files
should be loaded in binary format and decoded according to that
line, not assumed to be in the default coding system.
Fixes#398.