Skip to content

Commit 3d5c9cb

Browse files
committed
sp_hash: replace glob with nargs=+
1 parent e304e6e commit 3d5c9cb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lsh/sp_hash.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from typing import List, Set, Tuple, Iterator, TypeVar, Dict, Optional
22
from pathlib import Path
3-
from glob import glob
43
from collections import namedtuple
54
import pickle
65
import argparse
@@ -141,7 +140,7 @@ def main(cli_args: argparse.Namespace) -> None:
141140

142141
documents: Dict[str, Dict] = {}
143142

144-
for input_file in glob(cli_args.input_files):
143+
for input_file in cli_args.input_files:
145144
print(f"Processing {input_file}, sit tight...")
146145

147146
with smart_open.open(input_file, "rt", encoding="utf-8") as reader:
@@ -209,7 +208,7 @@ def main(cli_args: argparse.Namespace) -> None:
209208
description="Create LSH index of shingles from a JSONL file"
210209
)
211210
parser.add_argument(
212-
"input_files", help="glob for input JSONL files (archives are welcome)"
211+
"input_files", nargs="+", help="input JSONL files (archives are welcome)"
213212
)
214213
parser.add_argument(
215214
"output_dir",

0 commit comments

Comments
 (0)