Skip to content

Instantly share code, notes, and snippets.

@atwong
Last active March 31, 2025 19:52
Show Gist options
  • Save atwong/259b1867f8dbfa826e5692e73505640f to your computer and use it in GitHub Desktop.
Save atwong/259b1867f8dbfa826e5692e73505640f to your computer and use it in GitHub Desktop.
from argparse import ArgumentParser
from pathlib import Path
import re
PYTHON_FILE_PATTERN = re.compile(r"[a-zA-Z][a-zA-Z0-9_]*\.py")
def find_duplicate(entry: Path):
pass
def walker(topdir: Path):
for entry in topdir.iterdir():
if entry.is_dir():
walker(entry)
else:
find_duplicate(entry)
if __name__ == "__main__":
parser = ArgumentParser()
parser.add_argument("topdir", type=Path)
args = parser.parse_args()
walker(args.topdir)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment