INNER CODE UNIT · Python

pointer_files

labsai/EDDI · scripts/bump-version.py:118

    def pointer_files(self) -> list[Path]:
        files: list[Path] = []
        for entry in self.roots:
            base = self.root / entry
            candidates = [base] if base.is_file() else sorted(p for p in base.rglob("*") if p.is_file())
            for path in candidates:
                rel = path.relative_to(self.root).as_posix()
                if not rel.endswith(self.extensions):
                    continue
                # Each exclusion is a path prefix: a file, a directory ending in
                # "/", or a family such as "docs/release-notes-".
                if any(rel.startswith(ex) for ex in self.exclude):
                    continue
                files.append(path)
        return files

    def pointers(self) -> list[tuple[str, int, str]]:
        """(file, line number, version) for every match of every pattern."""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…