GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — pre-commit/pre_commit/prefix.py at master · tenevdev/pre-commit Expand file tree/ Copy pathprefix.pyMore file actions 17 lines (12 loc) · 484 Bytes / Copy pathprefix.pyFile metadata and controls17 lines (12 loc) · 484 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 import os.path from typing import NamedTuple from typing import Tuple class Prefix(NamedTuple): prefix_dir: str def path(self, *parts: str) -> str: return os.path.normpath(os.path.join(self.prefix_dir, *parts)) def exists(self, *parts: str) -> bool: return os.path.exists(self.path(*parts)) def star(self, end: str) -> Tuple[str, ...]: paths = os.listdir(self.prefix_dir) return tuple(path for path in paths if path.endswith(end)) |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |