forked from pool/python-jedi
- add delete.patch
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jedi?expand=0&rev=54
This commit is contained in:
43
delete.patch
Normal file
43
delete.patch
Normal 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):
|
||||
@@ -2,6 +2,7 @@
|
||||
Tue Feb 4 09:38:03 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- update to 0.16.0
|
||||
- add delete.patch
|
||||
* Added Script.get_context to get information where you currently are.
|
||||
* 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.
|
||||
|
||||
@@ -26,6 +26,7 @@ Group: Development/Languages/Python
|
||||
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
|
||||
BuildRequires: %{python_module parso >= 0.5.0}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
@@ -54,6 +55,7 @@ implementation as a VIM plugin which uses Jedi's autocompletion.
|
||||
%prep
|
||||
%setup -q -n jedi-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
rm -Rf jedi/third_party
|
||||
|
||||
%build
|
||||
|
||||
Reference in New Issue
Block a user