refactor: remove unused python2 code, optimize imports

This commit is contained in:
jar3b
2020-02-19 01:29:08 +03:00
parent d03aa0a78c
commit 966bec093f
21 changed files with 15 additions and 71 deletions

View File

@@ -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

View File

@@ -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()

View File

@@ -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)

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from enum import Enum # Типы вариаций слова