INNER CODE UNIT · Python

cfg

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

        cfg = json.loads(read(root / POINTERS))
        self.roots = cfg["roots"]
        self.extensions = tuple(cfg["extensions"])
        self.exclude = cfg["exclude"]
        # ASCII, so \d and \w mean what they mean in Java's regex.
        self.patterns = [re.compile(p, re.ASCII) for p in cfg["patterns"]]
        self.changed: list[str] = []

    # ── discovery ────────────────────────────────────────────────────────────
    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

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…