From e20349b13fdc61659607d6333e39b20f4e3e833f Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Sat, 6 Jan 2024 19:54:58 +0100 Subject: [PATCH] Revert "Read exclude patterns from .gitignore in absence of user-provided patterns (#344) (#345)" This reverts commit aa6fcd281d2a6f963a99ee6f3c5055876f5a54f5. After further thought, the --exclude flag and .gitignore file have different responsibilities and mixing them will surprise some users. --- CHANGELOG.md | 2 -- README.md | 4 --- requirements.txt | 1 - tests/test_gitignore_patterns.py | 56 -------------------------------- vulture/core.py | 17 +--------- 5 files changed, 1 insertion(+), 79 deletions(-) delete mode 100644 tests/test_gitignore_patterns.py diff --git a/CHANGELOG.md b/CHANGELOG.md index e8177a30..d9ec6de8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,6 @@ * Bump flake8, flake8-comprehensions and flake8-bugbear (Sebastian Csar, #341). * Switch to tomllib/tomli to support heterogeneous arrays (Sebastian Csar, #340). * Provide whitelist parity for `MagicMock` and `Mock` (maxrake). -* Use .gitignore to exclude files if --exclude is missing from both pyproject.toml and the command line (whosayn, #344, #345). -* Properly detect when no .gitignore is present (travisdart, #346). # 2.10 (2023-10-06) diff --git a/README.md b/README.md index e531d8ef..99b2ec81 100644 --- a/README.md +++ b/README.md @@ -83,10 +83,6 @@ If you want to ignore a whole file or directory, use the `--exclude` parameter (e.g., `--exclude "*settings.py,*/docs/*.py,*/test_*.py,*/.venv/*.py"`). The exclude patterns are matched against absolute paths. -Vulture 2.11+ parses the `.gitignore` file in the current working directory for -exclude patterns if the `--exclude` parameter is unused and if there are no -exclude patterns in the pyproject.toml file. - #### Flake8 noqa comments