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,6 +1,3 @@
# -*- coding: utf-8 -*-
class FiasException(Exception):
def __str__(self):
return repr(self.args[0])

View File

@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
import re
import Levenshtein
import re
def violet_ratio(pattern, candidate):
@@ -21,7 +19,7 @@ def violet_ratio(pattern, candidate):
max_ratio = ratio
max_j = j
result.append(max_j*abs(max_ratio))
result.append(max_j * abs(max_ratio))
if max_j > -1:
del allowed_nums[max_j]

View File

@@ -1,8 +1,5 @@
# -*- coding: utf-8 -*-
import logging
import os
from bottle import template
from aore.config import Folders, DatabaseConfig, SphinxConfig

View File

@@ -1,8 +1,5 @@
# -*- coding: utf-8 -*-
def trigram(inp):
inp = u"__"+inp+u"__"
inp = u"__" + inp + u"__"
output = []
for i in range(0, len(inp) - 2):