From 5d9be67b00748cfb898aa071699452c54e734d3e Mon Sep 17 00:00:00 2001 From: Jack Stdin Date: Thu, 18 Feb 2016 12:56:33 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=B7=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D0=BC=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D0=B8,=20sort=20results=20(ratio)=20anyway?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aore/fias/search.py | 3 +-- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/aore/fias/search.py b/aore/fias/search.py index 0701626..8b80d39 100644 --- a/aore/fias/search.py +++ b/aore/fias/search.py @@ -134,7 +134,6 @@ class SphinxSearch: results.append( dict(aoid=ma['attrs']['aoid'], text=ma['attrs']['fullname'], ratio=ma['weight'], cort=i)) - if strong: - results.sort(key=lambda x: Levenshtein.ratio(text, x['text']), reverse=True) + results.sort(key=lambda x: Levenshtein.ratio(text, x['text']), reverse=True) return results diff --git a/requirements.txt b/requirements.txt index d9193d0..4c5c823 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,5 +5,5 @@ PySimpleSOAP==1.16 python-Levenshtein==0.12.0 enum34>=1.0.0 rarfile -requests==2.8.1 +requests>=2.8.1 soap2py==1.16