Giter VIP home page Giter VIP logo

sync-rye-pre-commit's Introduction

sync-rye-pre-commit

License: MIT

Caution

Migrate from rye to uv.

see more: astral-sh/rye#1342

how to use

repos:
  - hooks:
      - id: sync-rye-pre-commit
        args:
          - "-a ruff:ruff:v:"
          - "-a ruff:ruff-format:v:"
    repo: https://github.com/phi-friday/sync-rye-pre-commit
    rev: v0.1.4

args

  • -a or --args: {library}[:{hook_id}[:{prefix}[:{suffix}]]] (defaults: [])
  • -p or --pyproject: pyproject.toml path (defaults: pyproject.toml)
  • -P or --pre-commit: .pre-commit-config.yaml path (defaults: .pre-commit-config.yaml)
  • -l or --log-level: log level (defaults: INFO)

success output

❯ rye run pre-commit run --all-files --show-diff-on-failure --verbose
Sync rye and pre commit..................................................Passed
- hook id: sync-rye-pre-commit
- duration: 0.53s

[INFO] - Processing args:
[INFO] -  - `{'name': 'ruff', 'hook_id': 'ruff', 'prefix': 'v', 'suffix': ''}`
[INFO] -  - `{'name': 'ruff', 'hook_id': 'ruff-format', 'prefix': 'v', 'suffix': ''}`
[INFO] -  - `{'name': 'mypy', 'hook_id': 'mypy', 'prefix': 'v', 'suffix': ''}`
[INFO] - Processing pyproject: `pyproject.toml`
[INFO] - Processing pre_commit: `.pre-commit-config.yaml`
[INFO] - Expected ruff to be v0.5.7, and found v0.5.7
[INFO] - Expected ruff-format to be v0.5.7, and found v0.5.7
[INFO] - Expected mypy to be v1.11.1, and found v1.11.1
[INFO] - Results:: 3 success, 0 errors

error output

❯ rye run pre-commit run --all-files --show-diff-on-failure --verbose
Sync rye and pre commit..................................................Failed
- hook id: sync-rye-pre-commit
- duration: 0.13s
- exit code: 1

[INFO] - Processing args:
[INFO] -  - `{'name': 'ruff', 'hook_id': 'ruff', 'prefix': 'v', 'suffix': ''}`
[INFO] -  - `{'name': 'ruff', 'hook_id': 'ruff-format', 'prefix': 'v', 'suffix': ''}`
[INFO] -  - `{'name': 'mypy', 'hook_id': 'mypy', 'prefix': 'v', 'suffix': ''}`
[INFO] - Processing pyproject: `pyproject.toml`
[INFO] - Processing pre_commit: `.pre-commit-config.yaml`
[INFO] - Expected mypy to be v1.11.1, and found v1.11.1
[ERROR] - Results:: 1 success, 2 errors
[ERROR] - Expected ruff to be v0.5.7, but found v0.5.6
[ERROR] - Expected ruff-format to be v0.5.7, but found v0.5.6

sync-rye-pre-commit's People

Contributors

phi-friday avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.