From 956bf3962edff284d05ad42576bac7e74ae8788d Mon Sep 17 00:00:00 2001 From: Ray Bell Date: Sun, 2 Oct 2022 12:26:45 -0400 Subject: [PATCH] Add .ipynb_checkpoints to DEFAULT_EXCLUDES (#3293) Jupyter creates a checkpoint file every single time you create an .ipynb file, and then it updates the checkpoint file every single time you manually save your progress for the initial .ipynb. These checkpoints are stored in a directory named `.ipynb_checkpoints`. Co-authored-by: Batuhan Taskaya --- CHANGES.md | 2 ++ src/black/const.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index c96d9a6..d3ba53f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -27,6 +27,8 @@ +- `.ipynb_checkpoints` directories are now excluded by default (#3293) + ### Packaging diff --git a/src/black/const.py b/src/black/const.py index 03afc96..0e13f31 100644 --- a/src/black/const.py +++ b/src/black/const.py @@ -1,4 +1,4 @@ DEFAULT_LINE_LENGTH = 88 -DEFAULT_EXCLUDES = r"/(\.direnv|\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|venv|\.svn|_build|buck-out|build|dist|__pypackages__)/" # noqa: B950 +DEFAULT_EXCLUDES = r"/(\.direnv|\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|venv|\.svn|\.ipynb_checkpoints|_build|buck-out|build|dist|__pypackages__)/" # noqa: B950 DEFAULT_INCLUDES = r"(\.pyi?|\.ipynb)$" STDIN_PLACEHOLDER = "__BLACK_STDIN_FILENAME__" -- 2.39.5