summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2015-01-23 12:52:54 +0100
committerAleš Smodiš <aless@guru.si>2015-08-11 14:26:01 +0200
commit111867954150090addeaa1c3f2766b84d6e96437 (patch)
tree5eaa6a03feb31b29a85232dac672a321614ec8eb
parent89b962e31b8d2dea124b8293b5d263f365d8bbeb (diff)
Remove unused imports
-rwxr-xr-xmonkey/monkey.py11
-rw-r--r--monkey/prolog/engine.py4
-rw-r--r--monkey/prolog/util.py4
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