From e22ba686f5d176c6ea4079d33e966eecc816ee24 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sun, 23 Aug 2026 10:10:49 +0200 Subject: [PATCH] fix(lint): prune gitignored vendor trees from the project walk The composer vendor tree lands in the repo root during the workspace suite, and the cached project walk descends it, so third-party files turn repo lints red. 8ff6b490b patched two consumers; the filename convention lint was the third. Co-Authored-By: Claude Opus 5 (1M context) --- tests/unit/python/utils/cache/test_files.py | 2 ++ utils/cache/files.py | 1 + 2 files changed, 3 insertions(+) diff --git a/tests/unit/python/utils/cache/test_files.py b/tests/unit/python/utils/cache/test_files.py index b7404ea94e..b614ed41db 100644 --- a/tests/unit/python/utils/cache/test_files.py +++ b/tests/unit/python/utils/cache/test_files.py @@ -80,6 +80,7 @@ class TestIterProjectFiles(_ProjectRootFixture, unittest.TestCase): _touch(self.root / "tests/unit/test_a.py", "import unittest") _touch(self.root / ".git/HEAD", "ref: refs/heads/main") _touch(self.root / "node_modules/pkg/index.js", "module.exports = {};") + _touch(self.root / "vendor/nette/utils/readme.md", "# vendored") _touch(self.root / "__pycache__/dead.pyc", "") def test_skip_dirs_pruned(self) -> None: @@ -90,6 +91,7 @@ class TestIterProjectFiles(_ProjectRootFixture, unittest.TestCase): ) self.assertFalse(any("/__pycache__/" in p for p in all_paths)) self.assertFalse(any("/node_modules/" in p for p in all_paths)) + self.assertFalse(any("/vendor/" in p for p in all_paths)) def test_extensions_filter(self) -> None: ymls = list(iter_project_files(extensions=(".yml",))) diff --git a/utils/cache/files.py b/utils/cache/files.py index ecfcea8b40..42249b8a39 100644 --- a/utils/cache/files.py +++ b/utils/cache/files.py @@ -49,6 +49,7 @@ _DEFAULT_SKIP_DIRS: frozenset[str] = frozenset( "venv", "__pycache__", "node_modules", + "vendor", } )