diff --git a/alteza/fs.py b/alteza/fs.py index 67a3797..e1ef2d4 100644 --- a/alteza/fs.py +++ b/alteza/fs.py @@ -441,8 +441,7 @@ def isHidden(name: str) -> bool: return name.startswith(".") @staticmethod - def defaultShouldIgnore(name: str, parentPath: str, isDir: bool) -> bool: - # pylint: disable=unused-argument + def shouldIgnoreStandard(name: str) -> bool: if Fs.isHidden(name): return True if name in {"__pycache__"}: @@ -452,10 +451,19 @@ def defaultShouldIgnore(name: str, parentPath: str, isDir: bool) -> bool: return True if name != Fs.configFileName and fileExt == ".py": return True + return False + + @staticmethod + def defaultShouldIgnore(name: str, parentPath: str, isDir: bool) -> bool: + # pylint: disable=unused-argument + if Fs.shouldIgnoreStandard(name): + return True + fullPath = os.path.abspath(os.path.join(parentPath, name)) for ignoreAbsPath in Fs.ignoreAbsPaths: if ignoreAbsPath in fullPath: return True + return False @staticmethod