Remove method _is_ignored_dirname

(Randomly ignoring directories starting with '.' is not appropriate)
This commit is contained in:
Dominik Jain authored and Dominik Jain committed 2025-08-21 19:02:57 +02:00
1 parent 2a388dc22c
commit ca8ac45c5e
1 file changed
-13
-13
View File
@@ -82,9 +82,6 @@ class Project:
"""
return self._ignore_spec
def _is_ignored_dirname(self, dirname: str) -> bool:
return dirname.startswith(".")
def _is_ignored_relative_path(self, relative_path: str | Path, ignore_non_source_files: bool = True) -> bool:
"""
Determine whether an existing path should be ignored based on file type and ignore patterns.
@@ -114,16 +111,6 @@ class Project:
if len(rel_path.parts) > 0 and rel_path.parts[0] == ".git":
return True
# Check each part of the path against always fulfilled ignore conditions
dir_parts = rel_path.parts
if is_file:
dir_parts = dir_parts[:-1]
for part in dir_parts:
if not part: # Skip empty parts (e.g., from leading '/')
continue
if self._is_ignored_dirname(part):
return True
return match_path(str(relative_path), self.get_ignore_spec(), root_path=self.project_root)
def is_ignored_path(self, path: str | Path, ignore_non_source_files: bool = False) -> bool: