forked from pool/python-jedi
- add typing.patch - fix test_sys_getwindowsversion with new parso
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jedi?expand=0&rev=56
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 6 11:55:48 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- add typing.patch - fix test_sys_getwindowsversion with new parso
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 4 09:38:03 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ URL: https://github.com/davidhalter/jedi
|
||||
Source0: https://files.pythonhosted.org/packages/source/j/jedi/jedi-%{version}.tar.gz
|
||||
Patch0: unbundle.patch
|
||||
Patch1: delete.patch
|
||||
Patch2: typing.patch
|
||||
BuildRequires: %{python_module parso >= 0.5.0}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
@@ -56,6 +57,7 @@ implementation as a VIM plugin which uses Jedi's autocompletion.
|
||||
%setup -q -n jedi-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
rm -Rf jedi/third_party
|
||||
|
||||
%build
|
||||
|
||||
17
typing.patch
Normal file
17
typing.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
Index: jedi-0.16.0/test/test_inference/test_gradual/test_typeshed.py
|
||||
===================================================================
|
||||
--- jedi-0.16.0.orig/test/test_inference/test_gradual/test_typeshed.py
|
||||
+++ jedi-0.16.0/test/test_inference/test_gradual/test_typeshed.py
|
||||
@@ -116,10 +116,10 @@ def test_sys_getwindowsversion(Script, e
|
||||
# This should only exist on Windows, but type inference should happen
|
||||
# everywhere.
|
||||
definitions = Script('import sys; sys.getwindowsversion().major').infer()
|
||||
+ def_, = definitions
|
||||
if environment.version_info.major == 2:
|
||||
- assert not definitions
|
||||
+ assert def_.name == 'Any'
|
||||
else:
|
||||
- def_, = definitions
|
||||
assert def_.name == 'int'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user