From 111867954150090addeaa1c3f2766b84d6e96437 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Fri, 23 Jan 2015 12:52:54 +0100 Subject: Remove unused imports --- monkey/monkey.py | 11 ++--------- monkey/prolog/engine.py | 4 +--- monkey/prolog/util.py | 4 ---- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/monkey/monkey.py b/monkey/monkey.py index 9e70a3f..8faad1a 100755 --- a/monkey/monkey.py +++ b/monkey/monkey.py @@ -1,19 +1,12 @@ #!/usr/bin/python3 -import collections import math -import pickle -import sys import time -from termcolor import colored - -from .action import parse -from .edits import classify_edits, clean_graph, edit_graph, get_edits_from_traces -from .graph import Node, graphviz +from .edits import classify_edits from .prolog.engine import test from .prolog.util import compose, decompose, map_vars, rename_vars, stringify -from .util import PQueue, Token, indent +from .util import PQueue, Token # score a program (a list of lines) according to lines distribution def score(program, lines): diff --git a/monkey/prolog/engine.py b/monkey/prolog/engine.py index 432ff79..e73ea54 100644 --- a/monkey/prolog/engine.py +++ b/monkey/prolog/engine.py @@ -5,10 +5,8 @@ import json import re import urllib -address, port = 'localhost', 3030 - class PrologEngine(object): - def __init__(self, address=address, port=port, code='', destroy=False, id=None): + def __init__(self, address='localhost', port=3030, code='', destroy=False, id=None): self.conn = http.client.HTTPConnection(address, port, timeout=10) # If existing engine ID is given, use it. diff --git a/monkey/prolog/util.py b/monkey/prolog/util.py index 05505d0..46f6c5c 100644 --- a/monkey/prolog/util.py +++ b/monkey/prolog/util.py @@ -1,9 +1,5 @@ #!/usr/bin/python3 -import itertools -import math -import re - from .lexer import lexer from ..util import Token -- cgit v1.2.1