logo
episode-header-image
Oct 2024
1h 10m

#482: Pre-commit Hooks for Python Devs

MICHAEL KENNEDY
About this episode
Do you struggle to make sure your code is always correct before you check it in? What about your team members' code? That one person who never wants to run the linter? Tired of dealing with tons of conflicts and spurious git changes? You need git pre-commit hooks. We're lucky to have Stefanie Molin on this episode who has done a bunch of writing and teaching of git hooks.

Episode sponsors

Sentry Error Monitoring, Code TALKPYTHON
Bluehost
Talk Python Courses

Links from the show

Stefanie Molin: stefaniemolin.com

Talk Python Blog: talkpython.fm/blog

How to Set Up Pre-Commit Hooks: stefaniemolin.com
Common Pre-Commit Errors and How to Solve Them: stefaniemolin.com
A Behind-the-Scenes Look at How Pre-Commit Works: stefaniemolin.com
Pre-Commit Hook Creation Guide: stefaniemolin.com
(Pre-)Commit to Better Code Workshop: stefaniemolin.com
exif-stripper: stefaniemolin.com
exif-stripper on GitHub: github.com
docstring-validation-using-pre-commit-hook: numpydoc.readthedocs.io
Data Morph: Moving Beyond the Datasaurus Dozen: stefaniemolin.com
Data Morph on GitHub: github.com
Watch this episode on YouTube: youtube.com
Episode transcripts: talkpython.fm

--- Stay in touch with us ---
Subscribe to us on YouTube: youtube.com
Follow Talk Python on Mastodon: talkpython
Follow Michael on Mastodon: mkennedy
Up next
May 5
#504: Developer Trends in 2025
What trends and technologies should you be paying attention to today? Are there hot new database servers you should check out? Or will that just be a flash in the pan? I love these forward looking episodes and this one is super fun. I've put together an amazing panel: Gina Häußge ... Show More
1h 9m
Apr 28
#503: The PyArrow Revolution
Pandas is at a the core of virtually all data science done in Python, that is virtually all data science. Since it's beginning, Pandas has been based upon numpy. But changes are afoot to update those internals and you can now optionally use PyArrow. PyArrow comes with a ton of be ... Show More
1h 8m
Apr 21
#502: Django Ledger: Accounting with Python
Do you or your company need accounting software? Well, there are plenty of SaaS products out there that you can give your data to. but maybe you also really like Django and would rather have a foundation to build your own accounting system exactly as you need for your company or ... Show More
1h 3m
Recommended Episodes
Oct 2024
830: GitHub and Code Reviews with Sarah Vessels
Scott and Wes talk with GitHub’s Sarah Vessels about the ins and outs of code reviews, their critical role in collaborative development, and tips for making your reviews more effective. Show Notes 00:00 Welcome to Syntax! 00:59 What is a code review? How to review code effectivel ... Show More
51m 28s
Mar 2025
Reaching industrial economies of scale (Changelog Interviews #632)
Beyang Liu, the CTO & Co-founder of Sourcegraph is back on the pod. Adam and Bryant go deep on the idea of “industrializing software development” using AI agents, using AI in general, using code generation. So much is happening in and around AI and Sourcegraph continues to innova ... Show More
1h 44m
Aug 2024
80% of professional programmers are unhappy (News)
The latest Stack Overflow Developer Survey has some concerning results, Joeri Sebrechts helps you do plain vanilla web dev, MIT’s “missing semester” course looks pretty amazing, a dive into the fascinating history of CSV & a tool to get request analytics from the nginx access log ... Show More
6m 44s
Nov 2024
ANTHOLOGY — Packages, pledges & protocols (Interview)
The hallway track at All Things Open 2024 — features Carl George, Principal Software Engineer at Red Hat for a discussion on the state of open source enterprise linux and RHEL (Red Hat Enterprise Linux), Max Howell, creator of Homebrew and tea.xyz which offers rewards and recogni ... Show More
1h 45m
Jun 2024
SE Radio 622: Wolf Vollprecht on Python Tooling in Rust
Wolf Vollprecht, the CEO and founder of Prefix.dev, speaks with host Gregory M. Kapfhammer about how to implement Python tools, such as package managers, in the Rust programming language. They discuss the challenges associated with building Python infrastructure tooling in Python ... Show More
55m 10s
Apr 25
How To Get The Most Out Of Vibe Coding | Startup School
AI can't yet one-shot an entire product—but with the rise of vibe coding, it's getting close. YC's Tom Blomfield has spent the last month building side projects with tools like Claude Code, Windsurf, and Aqua, seeing just how far you can push modern LLMs. From writing full-stack ... Show More
16m 39s
Nov 2024
851: The Future of VS Code and Copilot
Wes and Scott talk with Cassidy Williams and Harald Kirschner about exciting new features in VS Code and GitHub Copilot, including custom instructions, UI/UX improvements, and the future of AI and Copilot within different editors. Show Notes 00:00 Welcome to Syntax! 00:32 Cassidy ... Show More
42m 12s
May 6
The Secret AI Prompt Tool Silicon Valley Engineers Are Using
Episode 57: Can simply "Vibe coding" with AI really replace the need for deep code context when building real applications? Nathan Lands (https://x.com/NathanLands) is joined by Eric Provencher (https://x.com/pvncher), founder of Repo Prompt and an XR engineer at Unity, to reveal ... Show More
38m 7s
Jun 2024
Are Coding Jobs at Risk? AI's Impact on the Future of Coding ft. Python Simplified | Mariya Sha
Episode 12: Are coding jobs at risk with the rise of AI? Matt Wolfe (https://x.com/mreflow) and Nathan Lands (https://x.com/NathanLands) dive into this compelling topic with guest Mariya Sha (https://x.com/mariyasha888), a seasoned coder and the creator of the popular YouTube cha ... Show More
42m 37s