Skip to content

About

A pre-commit hook for unref, installed from the prebuilt wheels on PyPI.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

unref-pre-commit

A pre-commit and prek hook for unref, an extremely fast Python dead code finder.

It is a separate repository so that the hook installs the prebuilt wheel of unref from PyPI, rather than building unref from source.

Usage

Add the hook to your .pre-commit-config.yaml:

repos:
  - repo: https://github.com/Apakottur/unref-pre-commit
    rev: v0.5.1
    hooks:
      - id: unref

prek reads .pre-commit-config.yaml too, but it also supports its own prek.toml format:

[[repos]]
repo = "https://github.com/Apakottur/unref-pre-commit"
rev = "v0.5.1"
hooks = [{ id = "unref" }]

The hook checks the whole project rather than the changed files, as finding unused code needs every file. To configure unref, see its documentation.

About

A pre-commit hook for unref, installed from the prebuilt wheels on PyPI.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages