The list of differences have grown again in Python 3.9. Instead of
increasing the allowed count let's filter out more Linux-specific
constants. This probably makes it possible to reduce allowed
len(difference) too.
This avoids a `KeyError` from operator_to_magic_method lookup for
this case. Jedi probably could check for `__contains__` here, however
as it doesn't do so for `in` checks I'm following that lead for now.
Fixes https://github.com/davidhalter/jedi/issues/1594.
* Add support for generic optional parameters
* Tests for passing non-optional arguments to optional parameters
* Remove now-redundant is_class_value handling
This parameter has since been removed from infer_type_vars methods,
much simplifying the code.
* 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 test here is a bit contrived, the actual place I found this
was in using a NewType as a type within a NamedTuple. However due
to https://github.com/davidhalter/jedi/issues/1560 that currently
also fails for other reasons. This still feels useful to fix on
its own though.