X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/60f8bd2c89fbb370e6816fd6d6e5eca64d5b9f13..b8450b9faee10f3a0a63378b58adde60a27964e0:/src/black/files.py?ds=sidebyside diff --git a/src/black/files.py b/src/black/files.py index 1be5606..a0c92e8 100644 --- a/src/black/files.py +++ b/src/black/files.py @@ -204,6 +204,8 @@ def gen_python_files( continue if child.is_dir(): + # If gitignore is None, gitignore usage is disabled, while a Falsey + # gitignore is when the directory doesn't have a .gitignore file. yield from gen_python_files( child.iterdir(), root, @@ -212,7 +214,7 @@ def gen_python_files( extend_exclude, force_exclude, report, - gitignore, + gitignore + get_gitignore(child) if gitignore is not None else None, ) elif child.is_file():