Python
-
TIL: pytest's xfail strict flag fails if the test unexpectedly passes
Marking a test @pytest.mark.xfail(strict=True) fails CI if the bug got fixed and nobody un-xfailed.
-
Bounded parallelism with asyncio.gather
A Semaphore wrapper that caps concurrent coroutines without losing gather ergonomics.
-
A Click stub for a multi-subcommand CLI
The pattern I copy when I am tired of argparse and need something useful in five minutes.
-
Streaming a large CSV in Python without loading it
The DictReader loop plus a progress tick, so I stop reaching for pandas on 20GB files.
-
TIL: direnv layout_python just works
No more activating venvs manually. layout python in .envrc handles it.