Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Improve performance of code folding and indent guides #16446

Merged
merged 4 commits into from
Sep 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies:
- intervaltree >=3.0.2
- ipython >=7.6.0
- jedi >=0.17.2,<0.19.0
- jellyfish >=0.7
- jsonschema >=3.2.0
- keyring >=17.0.0
- nbconvert >=4.0
Expand Down
1 change: 1 addition & 0 deletions requirements/conda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ diff-match-patch >=20181111
intervaltree >=3.0.2
IPython >=7.6.0
jedi >=0.17.2,<0.19.0
jellyfish >=0.7
jsonschema >=3.2.0
keyring >=17.0.0
nbconvert >=4.0
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def run(self):
'intervaltree>=3.0.2',
'ipython>=7.6.0',
'jedi>=0.17.2,<0.19.0',
'jellyfish>=0.7',
'jsonschema>=3.2.0',
'keyring>=17.0.0',
'nbconvert>=4.0',
Expand Down
5 changes: 5 additions & 0 deletions spyder/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
INTERVALTREE_REQVER = None if is_pynsist() else '>=3.0.2'
IPYTHON_REQVER = ">=7.6.0"
JEDI_REQVER = '>=0.17.2;<0.19.0'
JELLYFISH_REQVER = '>=0.7'
JSONSCHEMA_REQVER = '>=3.2.0'
KEYRING_REQVER = '>=17.0.0'
NBCONVERT_REQVER = '>=4.0'
Expand Down Expand Up @@ -127,6 +128,10 @@
'package_name': "jedi",
'features': _("Main backend for the Python Language Server"),
'required_version': JEDI_REQVER},
{'modname': "jellyfish",
'package_name': "jellyfish",
'features': _("Optimize algorithms for folding"),
'required_version': JELLYFISH_REQVER},
{'modname': 'jsonschema',
'package_name': 'jsonschema',
'features': _('Verify if snippets files are valid'),
Expand Down
2 changes: 1 addition & 1 deletion spyder/plugins/editor/panels/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def merge_folding(ranges, current_tree, root):
while deleted_entry is not None and changed_entry is not None:
deleted_entry_i = deleted_entry.data
changed_entry_i = changed_entry.data
dist = textdistance.jaccard.normalized_similarity(
dist = textdistance.hamming.normalized_similarity(
deleted_entry_i.text, changed_entry_i.text)

if dist >= 0.80:
Expand Down