14
0
forked from pool/python-jedi
2020-02-04 11:43:22 +00:00
committed by Git OBS Bridge
parent 49510a83a9
commit 05129cec46
3 changed files with 46 additions and 0 deletions

43
delete.patch Normal file
View File

@@ -0,0 +1,43 @@
From bec87f7ff82b0731713c6520a14c213341b4cecf Mon Sep 17 00:00:00 2001
From: Dave Halter <davidhalter88@gmail.com>
Date: Sun, 26 Jan 2020 20:07:25 +0100
Subject: [PATCH] Jedi understand now when you use del, fixes #313
---
test/completion/basic.py | 6 +++---
test/test_api/test_full_name.py | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/test/completion/basic.py b/test/completion/basic.py
index b40068179..3ff919ca6 100644
--- a/test/completion/basic.py
+++ b/test/completion/basic.py
@@ -209,11 +209,11 @@ def global_as_import():
deleted_var = 3
del deleted_var
-#? int()
+#?
deleted_var
-#? ['deleted_var']
+#? []
deleted_var
-#! ['deleted_var = 3']
+#! []
deleted_var
# -----------------
diff --git a/test/test_api/test_full_name.py b/test/test_api/test_full_name.py
index 4fdb861b0..6858b6ca8 100644
--- a/test/test_api/test_full_name.py
+++ b/test/test_api/test_full_name.py
@@ -112,7 +112,8 @@ def test_os_path(Script):
def test_os_issues(Script):
"""Issue #873"""
- assert [c.name for c in Script('import os\nos.nt''').complete()] == ['nt']
+ # nt is not found, because it's deleted
+ assert [c.name for c in Script('import os\nos.nt''').complete()] == []
def test_param_name(Script):

View File

@@ -2,6 +2,7 @@
Tue Feb 4 09:38:03 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com> Tue Feb 4 09:38:03 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
- update to 0.16.0 - update to 0.16.0
- add delete.patch
* Added Script.get_context to get information where you currently are. * Added Script.get_context to get information where you currently are.
* Completions/type inference of Pytest fixtures. * Completions/type inference of Pytest fixtures.
* Tensorflow, Numpy and Pandas completions should now be about 4-10x faster after the first time they are used. * Tensorflow, Numpy and Pandas completions should now be about 4-10x faster after the first time they are used.

View File

@@ -26,6 +26,7 @@ Group: Development/Languages/Python
URL: https://github.com/davidhalter/jedi URL: https://github.com/davidhalter/jedi
Source0: https://files.pythonhosted.org/packages/source/j/jedi/jedi-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/j/jedi/jedi-%{version}.tar.gz
Patch0: unbundle.patch Patch0: unbundle.patch
Patch1: delete.patch
BuildRequires: %{python_module parso >= 0.5.0} BuildRequires: %{python_module parso >= 0.5.0}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
@@ -54,6 +55,7 @@ implementation as a VIM plugin which uses Jedi's autocompletion.
%prep %prep
%setup -q -n jedi-%{version} %setup -q -n jedi-%{version}
%patch0 -p1 %patch0 -p1
%patch1 -p1
rm -Rf jedi/third_party rm -Rf jedi/third_party
%build %build