The Python Podcast.__init__

Keep Your Code Clean Using pre-commit with Anthony Sottile


Listen Later

Summary

Maintaining the health and well-being of your software is a never-ending responsibility. Automating away as much of it as possible makes that challenge more achievable. In this episode Anthony Sottile describes his work on the pre-commit framework to simplify the process of writing and distributing functions to make sure that you only commit code that meets your definition of clean. He explains how it supports tools and repositories written in multiple languages, enforces team standards, and how you can start using it today to ship better software.

Preface
  • Hello and welcome to Podcast.__init__, the podcast about Python and the people who make it great.
  • When you’re ready to launch your next app you’ll need somewhere to deploy it, so check out Linode. With private networking, shared block storage, node balancers, and a 40Gbit network, all controlled by a brand new API you’ve got everything you need to scale up. Go to podcastinit.com/linode to get a $20 credit and launch a new server in under a minute.
  • Visit the site to subscribe to the show, sign up for the newsletter, and read the show notes. And if you have any questions, comments, or suggestions I would love to hear them. You can reach me on Twitter at @Podcast__init__ or email [email protected])
  • To help other people find the show please leave a review on iTunes, or Google Play Music, tell your friends and co-workers, and share it on social media.
  • Join the community in the new Zulip chat workspace at podcastinit.com/chat
  • Your host as usual is Tobias Macey and today I’m interviewing Anthony Sottile about pre-commit, a framework for managing and maintaining hooks for multiple languages
  • Interview
    • Introductions
    • How did you get introduced to Python?
    • Can you start by describing what a pre-commit hook is and some of the ways that they are useful for developers?
    • What was you motivation for creating a framework to manage your pre-commit hooks?
      • How does it differ from other projects built to manage these hooks?

      • What are the steps for getting someone started with pre-commit in a new project?

      • Which other event hooks would be most useful to implement for maintaining the health of a repository?

      • What types of operations are most useful for ensuring the health of a project?

      • What types of routines should be avoided as a pre-commit step?

      • Installing the hooks into a user’s local environment is a manual step, so how do you ensure that all of your developers are using the configured hooks?

        • What factors have you found that lead to developers skipping or disabling hooks?

        • How is pre-commit implemented and how has that design evolved from when you first started?

          • What have been the most difficult aspects of supporting multiple languages and package managers?
          • What would you do differently if you started over today?
          • Would you still use Python?

          • For someone who wants to write a plugin for pre-commit, what are the steps involved?

          • What are some of the strangest or most unusual uses of pre-commit hooks that you have seen?

          • What are your plans for the future of pre-commit?

          • Keep In Touch
            • asottile on GitHub
            • @codewithanthony on Twitter
            • anthonywritescode on twitch
            • anthonywritescode on YouTube
            • Picks
              • Tobias
                • Tag

                • Anthony

                  • Yes Theory

                  • Links
                    • pre-commit
                      • List of hooks

                      • Lyft

                        • Careers

                        • Git

                        • Git hooks

                          • https://githooks.com/?utm_source=rss&utm_medium=rss

                          • Flake8

                          • Make

                          • Tox

                          • Type Annotations

                          • xargs

                          • Bash

                          • shlex

                          • The intro and outro music is from Requiem for a Fish The Freak Fandango Orchestra / CC BY-SA

                            ...more
                            View all episodesView all episodes
                            Download on the App Store

                            The Python Podcast.__init__By Tobias Macey

                            • 4.4
                            • 4.4
                            • 4.4
                            • 4.4
                            • 4.4

                            4.4

                            100 ratings


                            More shows like The Python Podcast.__init__

                            View all
                            The Changelog: Software Development, Open Source by Changelog Media

                            The Changelog: Software Development, Open Source

                            283 Listeners

                            Data Skeptic by Kyle Polich

                            Data Skeptic

                            481 Listeners

                            Chat With Traders by Tessa Dao

                            Chat With Traders

                            1,979 Listeners

                            Talk Python To Me by Michael Kennedy

                            Talk Python To Me

                            593 Listeners

                            Software Engineering Daily by Software Engineering Daily

                            Software Engineering Daily

                            623 Listeners

                            The TWIML AI Podcast (formerly This Week in Machine Learning & Artificial Intelligence) by Sam Charrington

                            The TWIML AI Podcast (formerly This Week in Machine Learning & Artificial Intelligence)

                            445 Listeners

                            Super Data Science: ML & AI Podcast with Jon Krohn by Jon Krohn

                            Super Data Science: ML & AI Podcast with Jon Krohn

                            297 Listeners

                            Python Bytes by Michael Kennedy and Brian Okken

                            Python Bytes

                            215 Listeners

                            Data Engineering Podcast by Tobias Macey

                            Data Engineering Podcast

                            142 Listeners

                            Machine Learning Guide by OCDevel

                            Machine Learning Guide

                            764 Listeners

                            Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

                            Syntax - Tasty Web Development Treats

                            981 Listeners

                            DataFramed by DataCamp

                            DataFramed

                            267 Listeners

                            Practical AI by Practical AI LLC

                            Practical AI

                            190 Listeners

                            The Real Python Podcast by Real Python

                            The Real Python Podcast

                            140 Listeners

                            Hard Fork by The New York Times

                            Hard Fork

                            5,426 Listeners