optimize imports
This commit is contained in:
parent
1cde856661
commit
a7bc72493e
@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
|
||||
|
||||
"""
|
||||
|
@ -25,7 +25,6 @@ class Statement(StatementMixin):
|
||||
"""
|
||||
|
||||
def __init__(self, text, **kwargs):
|
||||
import sys
|
||||
|
||||
# Try not to allow non-string types to be passed to statements
|
||||
try:
|
||||
|
@ -1,11 +1,12 @@
|
||||
from chatter.chatterbot.constants import TAG_NAME_MAX_LENGTH, STATEMENT_TEXT_MAX_LENGTH
|
||||
from chatter.chatterbot.conversation import StatementMixin
|
||||
from chatter.chatterbot.ext.sqlalchemy_app.types import UnicodeString
|
||||
from sqlalchemy import Table, Column, Integer, DateTime, ForeignKey, PickleType
|
||||
from sqlalchemy.ext.declarative import declared_attr, declarative_base
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.sql import func
|
||||
|
||||
from chatter.chatterbot.constants import TAG_NAME_MAX_LENGTH, STATEMENT_TEXT_MAX_LENGTH
|
||||
from chatter.chatterbot.conversation import StatementMixin
|
||||
from chatter.chatterbot.ext.sqlalchemy_app.types import UnicodeString
|
||||
|
||||
|
||||
class ModelBase(object):
|
||||
"""
|
||||
|
@ -12,8 +12,6 @@ class VariableInputTypeAdapter(InputAdapter):
|
||||
VALID_FORMATS = (JSON, TEXT, OBJECT, )
|
||||
|
||||
def detect_type(self, statement):
|
||||
import sys
|
||||
|
||||
|
||||
string_types = str
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from chatter.chatterbot.conversation import Statement
|
||||
|
||||
from .best_match import BestMatch
|
||||
|
||||
|
||||
|
@ -3,7 +3,6 @@ from __future__ import unicode_literals
|
||||
from collections import Counter
|
||||
|
||||
from chatter.chatterbot import utils
|
||||
|
||||
from .logic_adapter import LogicAdapter
|
||||
|
||||
|
||||
|
@ -27,7 +27,6 @@ def unescape_html(chatbot, statement):
|
||||
Convert escaped html characters into unescaped html characters.
|
||||
For example: "<b>" becomes "<b>".
|
||||
"""
|
||||
import sys
|
||||
|
||||
# Replace HTML escape characters
|
||||
import html
|
||||
@ -43,8 +42,6 @@ def convert_to_ascii(chatbot, statement):
|
||||
For example: "på fédéral" becomes "pa federal".
|
||||
"""
|
||||
import unicodedata
|
||||
import sys
|
||||
|
||||
|
||||
text = unicodedata.normalize('NFKD', statement.text)
|
||||
text = text.encode('ascii', 'ignore').decode('utf-8')
|
||||
|
@ -75,8 +75,6 @@ def input_function():
|
||||
Normalizes reading input between python 2 and 3.
|
||||
The function 'raw_input' becomes 'input' in Python 3.
|
||||
"""
|
||||
import sys
|
||||
|
||||
|
||||
user_input = input() # NOQA
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user