From d4fdb8ce1a14f5633dfff21ed2333379615a1e1a Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 6 Jan 2016 12:36:51 +0100 Subject: Remove unused imports --- db/models.py | 1 - monkey/__init__.py | 6 ++---- monkey/action.py | 3 --- monkey/edits.py | 4 ++-- prolog/engine.py | 1 - 5 files changed, 4 insertions(+), 11 deletions(-) diff --git a/db/models.py b/db/models.py index eaf67d7..9edbec4 100644 --- a/db/models.py +++ b/db/models.py @@ -15,7 +15,6 @@ # along with this program. If not, see . import collections -import json from . import get_connection, return_connection diff --git a/monkey/__init__.py b/monkey/__init__.py index db00493..ec09e62 100644 --- a/monkey/__init__.py +++ b/monkey/__init__.py @@ -14,12 +14,10 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -import math import time -import prolog.engine -from prolog.util import Token, tokenize, rename_vars, stringify, parse, interesting_ranges, rename_vars_list -from .util import damerau_levenshtein, PQueue +from prolog.util import tokenize, rename_vars, stringify, parse, interesting_ranges, rename_vars_list +from .util import PQueue # Starting from [code], find a sequence of edits that transforms it into a # correct predicate for [name]. The [test] function is used to test generated diff --git a/monkey/action.py b/monkey/action.py index 8a1e477..2ea311c 100644 --- a/monkey/action.py +++ b/monkey/action.py @@ -185,9 +185,6 @@ def expand(actions): # some sample code if __name__ == '__main__': - import sys, os.path - sys.path.append(os.path.dirname(os.path.realpath(__file__)) + '/..') # the parent directory is the app directory - from db.models import Problem, Solution # print all problem ids diff --git a/monkey/edits.py b/monkey/edits.py index c8a645e..4774c9a 100644 --- a/monkey/edits.py +++ b/monkey/edits.py @@ -18,8 +18,8 @@ import collections import math from .action import expand, parse -from prolog.util import Token, normalized, parse as prolog_parse, rename_vars, rename_vars_ast, rename_vars_list, interesting_ranges, stringify, tokenize -from .util import get_line, avg, logistic +from prolog.util import normalized, parse as prolog_parse, rename_vars, rename_vars_ast, rename_vars_list, interesting_ranges, stringify, tokenize +from .util import avg, logistic def get_edits_from_trace(trace, test, id): submissions = set() # Program versions at 'test' actions. diff --git a/prolog/engine.py b/prolog/engine.py index 43991d4..780799e 100644 --- a/prolog/engine.py +++ b/prolog/engine.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -import collections import html import http.client import json -- cgit v1.2.1