X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/36bed855e11b119adc4cd5b3ad87e2da965928ba..1aa14c5db05681a2c25b2c3757d3f8d8f3bbe85f:/black.py?ds=sidebyside diff --git a/black.py b/black.py index 730c64d..0dce397 100644 --- a/black.py +++ b/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}")