X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/c0cc19b5b3371842d696875897bebefebd5e1596..ddb99241b583f45e01df622c0d8f119aecd0188e:/src/black/__init__.py diff --git a/src/black/__init__.py b/src/black/__init__.py index 86a0b63..5b8c974 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -653,6 +653,11 @@ def get_sources( if exclude is None: exclude = re_compile_maybe_verbose(DEFAULT_EXCLUDES) gitignore = get_gitignore(root) + p_gitignore = get_gitignore(p) + # No need to use p's gitignore if it is identical to root's gitignore + # (i.e. root and p point to the same directory). + if gitignore != p_gitignore: + gitignore += p_gitignore else: gitignore = None sources.update( @@ -1370,7 +1375,9 @@ def patch_click() -> None: def patched_main() -> None: - if sys.platform == "win32" and getattr(sys, "frozen", False): + # PyInstaller patches multiprocessing to need freeze_support() even in non-Windows + # environments so just assume we always need to call it if frozen. + if getattr(sys, "frozen", False): from multiprocessing import freeze_support freeze_support()