aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-11-05 15:17:20 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-11-05 15:17:20 +0100
commit242ad04f821294b27e1cbc85beed06099a764d5f (patch)
tree5bdf6f15ef1ad8dea41871f263c8f40135b50f0b
parent76541f0daf7bf4ae5d1dfbaecfb695e9d18ec718 (diff)
downloadfuzzycat-242ad04f821294b27e1cbc85beed06099a764d5f.tar.gz
fuzzycat-242ad04f821294b27e1cbc85beed06099a764d5f.zip
fix flag issues
-rw-r--r--fuzzycat/cluster.py2
-rw-r--r--fuzzycat/main.py4
2 files changed, 2 insertions, 4 deletions
diff --git a/fuzzycat/cluster.py b/fuzzycat/cluster.py
index 16523af..a40db06 100644
--- a/fuzzycat/cluster.py
+++ b/fuzzycat/cluster.py
@@ -128,7 +128,7 @@ class Cluster:
"""
keyfunc = self.keyfunc # Save a lookup in loop.
with tempfile.NamedTemporaryFile(delete=False, mode="w", prefix=self.prefix) as tf:
- for line in enumerate(fileinput.input(files=self.files))
+ for line in fileinput.input(files=self.files):
try:
id, key = keyfunc(json.loads(line))
print("{}\t{}".format(id, key), file=tf)
diff --git a/fuzzycat/main.py b/fuzzycat/main.py
index 7f47181..44e0857 100644
--- a/fuzzycat/main.py
+++ b/fuzzycat/main.py
@@ -28,8 +28,7 @@ def run_cluster(args):
cluster = Cluster(files=args.files,
keyfunc=types.get(args.type),
tmpdir=args.tmpdir,
- prefix=args.prefix,
- verbose=args.verbose)
+ prefix=args.prefix)
cluster.run()
@@ -47,7 +46,6 @@ if __name__ == '__main__':
parser.add_argument('--prefix', default='fuzzycat-', help='temp file prefix')
parser.add_argument('--tmpdir', default=tempfile.gettempdir(), help='temporary directory')
- parser.add_argument('--verbose', default=False, action='store_true', help='be verbose')
subparsers = parser.add_subparsers()
sub_cluster = subparsers.add_parser('cluster', help='group entities', parents=[parser])