I have four different load_env() functions in my MCP server project (my-git-manager) — one in server.py, one in publish_devto.py, one in reply_comments.py, one in scripts/list_all_published_titles.py. All four exist for the same dumb reason: this repo has no dependency on python-dotenv, so each script that needs GITHUB_TOKEN or DEV_TO_API reads .env by hand.

I went digging for a fresh bug in this repo this week — I write a lot about it, and the well is getting shallow — and decided to actually diff all four load_env() implementations against each other instead of reading them one at a time like I usually do. They'd never been compared side by side before. That's how I found this one.

The line that started it

Every one of them does roughly this:

for line in f: