Skip to content

Commit

Permalink
fix --ext default value
Browse files Browse the repository at this point in the history
  • Loading branch information
titusz committed Jul 21, 2015
1 parent 2f5feb7 commit e425ece
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/onixcheck/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@click.command()
@click.argument('infile', type=click.File('rb'), required=False)
@click.option('--path', '-p', type=click.Path(exists=True, resolve_path=True), help='Validate all files in path')
@click.option('--ext', '-e', multiple=True, default={'xml'}, help='Extension to check (default: xml)')
@click.option('--ext', '-e', multiple=True, help='Extension to check (default: xml, onx, onix)')
@click.option('--recursive', '-r', default=False, is_flag=True, help='Scan subdirectories in path')
@click.option('--debug', '-d', is_flag=True, help='Show debug information')
@click.version_option(prog_name='Onixcheck')
Expand Down
4 changes: 2 additions & 2 deletions src/onixcheck/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from os.path import splitext, join
from scandir import scandir, walk

DEFAULT_EXTENSIONS = {'xml', 'onx', 'onix'}
DEFAULT_EXTENSIONS = ('xml', 'onx', 'onix')


def iter_files(root, exts=None, recursive=False):
Expand All @@ -20,7 +20,7 @@ def iter_files(root, exts=None, recursive=False):
if exts is None:
exts = DEFAULT_EXTENSIONS

exts = {x.lower() for x in exts}
exts = set((x.lower() for x in exts))

if recursive is False:
for entry in scandir(root):
Expand Down

0 comments on commit e425ece

Please sign in to comment.