From 0161da9d6d87febef30d74905c78e04edccb50b1 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sat, 27 Sep 2025 13:12:56 -0700 Subject: [PATCH] [skip ci] .gitignore: exclude __pycache__ directories (#5838) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Python may leave behind temporary `.pyc.*` files inside `__pycache__` on some filesystems (e.g. WSL2 mounts). Adding `__pycache__/` ensures these directories and any leftover files are consistently ignored. Background: Python writes bytecode to a temp file with an extra suffix before renaming it to `.pyc`. If the process is interrupted or the filesystem rename isn’t fully atomic, those temp files may remain. See: https://docs.python.org/3/library/py_compile.html#py_compile.compile --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5875be36a..b007bb19a 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ MANIFEST /.ninja_* /*.ninja /docs/.build +__pycache__/ *.py[co] *.egg-info *~