HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
pre-commit
pre-commit-hooks
Python2014–2023
pre-commit / pre-commit-hooks

pre-commit-hooks

Some out-of-the-box hooks for pre-commit

6Distinct people
6Mentions
0Explicit recommenders
6.7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Some out-of-the-box hooks for pre-commit

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

  • psf/black · linked in 2 of the same discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year6 dated mentions

Observed mentions: 2014-08-28 04:22:19 UTC to 2023-04-06 17:16:16 UTC.

01232014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC101
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC000
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC000
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC303
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101

What Hacker News says

6 sources
> Git hooks with pre-commit In projects where I am involved in, we usually set up hooks that run a few checks from https://github.com/pre-commit/pre-commit-hooks plus https://github.com/asottile/pyupgrade plus https://github.com/psf/black plus maybe the mypy and flake8 hooks. These hooks are also run in a "lint" stage by by tox, which is also run on the CI system. This catches some lints that slip through every now and then, before you go on to commit them. Also, a tox run will as a side effect also reformat the code before you check it in, which is a nice laziness feature. I am currently thinking if I should move to the pytest plugins for mypy and flake8 because I find they make more sense as tests, especially if I'm developing inside a venv and repeatedly run pytest instead of tox. That would also mean that the mypy and flake8 checks ar
Read the rest
e run repeatedly for every Python interpreter I want to tox, unkess I invest some time into coming up with better TOXENVs. Hm.
In How to set up a perfect Python project
Your parent is correct. Here's our pre-commit config too FWIW: more .pre-commit-config.yaml repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.1.0 hooks: - id: end-of-file-fixer - id: check-json - id: check-yaml - repo: https://github.com/asottile/reorder_python_imports rev: v1.3.4 hooks: - id: reorder-python-imports args: [--application-directories=gaia] language_version: python3 - repo: https://github.com/ambv/black rev: stable hooks: - id: black language_version: python3 - repo: local hooks: - id: eslint name: eslint entry: ./frontend/node_modules/.bin/eslint --fix language: node language_version: system files: \.(js|jsx|ts|tsx)$ - repo: https://github
Read the rest
.com/prettier/prettier rev: "1.15.3" hooks: - id: prettier files: \.(yml|yaml|md|json)$ language_version: system
In Black – Uncompromising Python code formatter
(1) We definitely thought about implementing a search/auto-suggest for pre-commit. We'd love help from the community to build a solution for that. You can follow/add ideas on the v2 label - https://github.com/pre-commit/pre-commit/issues/10 For the time being our registry of available hooks is here: https://github.com/pre-commit/pre-commit.github.io/blob/real.... We use that file to generate this page - http://pre-commit.com/hooks.html. It's also available as json - http://pre-commit.com/all-hooks.json. If you create new hooks for pre-commit we'd love to get a pull request to add to all-repos.yaml. It would be awesome to have `pre-commit search <keyword>` and `pre-commit add <hook-id>`. (2) I think we could integrate with yeoman generators to provide the company wide requirements. It's really hard to make assumptions about the structure o
Read the rest
f a repo, often just knowing extensions is not enough to identify file types (e.g. tests, auto generated code). Generally we leave it up to the developer, we don't want to enforce too much. We're definitely encouraging fixers over linters at Yelp. It's great to tell a developer "Hey you missed a semicolon" via jshint but it's much more useful to say "Hey you missed a semicolon, we fixed it and our change is unstaged, if you agree with our change add/commit" via fixmyjs. We'll be supporting fixmyjs really soon. We were blocked by https://github.com/jshint/fixmyjs/pull/99 and now we're just waiting for the next release. If you're a python developer using our autopep8-wrapper (found in this repo - https://github.com/pre-commit/pre-commit-hooks) is really awesome. It fixes a lot of the simple pep8 issues.
In Show HN: Pre-commit – A framework for managing multi-language pre-commit hooks

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.