[trivial] Simplify stdin handling
This commit is contained in:
parent
4cb338e3dd
commit
1aa14c5db0
4
black.py
4
black.py
@ -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}")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user