Skip to content

Commit

Permalink
feat: file can now be specified with wildcards on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tos-kamiya committed Sep 11, 2022
1 parent bf403ee commit c347042
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dendro_text/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.0
1.7.0
8 changes: 8 additions & 0 deletions dendro_text/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import numpy as np
from tqdm import tqdm
from init_attrs_with_kwargs import cast_set_attrs
from win_wildcard import get_windows_shell, SHELL_TO_EXPAND_WILDCARD_FUNC

try:
from docopt import docopt
Expand Down Expand Up @@ -272,6 +273,13 @@ def main():
)

files = args.file
ws = get_windows_shell()
if ws is not None:
expand_func = SHELL_TO_EXPAND_WILDCARD_FUNC[ws]
r = []
for f in files:
r.extend(expand_func(f))
files = r
if not (args.diff or args.no_uniq_files):
files = uniq(files)

Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ install_requires =
# matplotlib # for option -p
tqdm
init-attrs-with-kwargs>=0.2.0
win-wildcard>=0.5.0

[options.extras_require]
docopt-ng = docopt-ng
Expand Down

0 comments on commit c347042

Please sign in to comment.