refactor: remove unused python2 code, optimize imports
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import logging
|
||||
import psycopg2
|
||||
import re
|
||||
import traceback
|
||||
import urllib.parse
|
||||
from uuid import UUID
|
||||
|
||||
import psycopg2
|
||||
from bottle import template
|
||||
from uuid import UUID
|
||||
|
||||
from aore.config import DatabaseConfig, BasicConfig
|
||||
from aore.dbutils.dbimpl import DBImpl
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import Levenshtein
|
||||
import logging
|
||||
import re
|
||||
import time
|
||||
|
||||
import Levenshtein
|
||||
import sphinxapi
|
||||
import time
|
||||
|
||||
from aore.config import BasicConfig
|
||||
from aore.config import SphinxConfig
|
||||
@@ -108,7 +106,6 @@ class SphinxSearch:
|
||||
# text - текст найденного адресного объекта
|
||||
# ratio - рейтинг найденного пункта
|
||||
# cort - рейтинг количества совпавших слов
|
||||
|
||||
def find(self, text, strong):
|
||||
def split_phrase(phrase):
|
||||
phrase = phrase.lower()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
|
||||
from aore.config import SphinxConfig
|
||||
@@ -148,8 +147,5 @@ class WordEntry:
|
||||
def get_type(self):
|
||||
return ", ".join([x for x in self.match_types if self.__dict__[x]])
|
||||
|
||||
def __unicode__(self):
|
||||
return self.word
|
||||
|
||||
def __str__(self):
|
||||
return str(self.word)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from enum import Enum # Типы вариаций слова
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user