Skip to content

About

pre-commit hooks for Zuban

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

32 Commits

Folders and files

Repository files navigation

Zuban pre-commit hooks

Pre-commit / Prek hook for Zuban.

Using with pre-commit

Example .pre-commit-config.yaml:

repos:
  - repo: https://github.com/zubanls/zuban-pre-commit
    rev: v0.10.2
    hooks:
      # Run `zuban check`
      - id: zuban
        args: [--pretty]  # optional

      # Run `zuban mypy`
      - id: zmypy
        args: [--warn-unreachable]  # optional

Command-line arguments are optional. You can read more about the available options in the Zuban CLI documentation.

Most configuration should live in:

  • pyproject.toml under [tool.zuban], or
  • mypy.ini

See the configuration reference for more details.

Note

zuban check auto-detects its mode based on CLI flags and project configuration ([tool.zuban], [tool.mypy], or mypy.ini).

Use the zmypy hook to explicitly run zuban mypy.

Using with prek

Example prek.toml:

[[repos]]
repo = "https://github.com/zubanls/zuban-pre-commit"
rev = "v0.10.2"

hooks = [
  { id = "zuban", args = ["--pretty"] },            # default / auto-detected mode
  { id = "zmypy", args = ["--warn-unreachable"] },  # force mypy-compatible mode
]

Hooks

  • zuban: runs zuban check
  • zmypy: runs zuban mypy

About

pre-commit hooks for Zuban

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages