[trivial] Simplify stdin handling

This commit is contained in:
Łukasz Langa 2018-06-04 11:06:38 -07:00
parent 4cb338e3dd
commit 1aa14c5db0

View File

@ -260,11 +260,9 @@ def main(
sources.extend(
gen_python_files_in_dir(p, root, include_regex, exclude_regex)
)
elif p.is_file():
elif p.is_file() or s == "-":
# if a file was explicitly given, we don't care about its extension
sources.append(p)
elif s == "-":
sources.append(Path("-"))
else:
err(f"invalid path: {s}")