Skip to content

Commit

Permalink
chore: configure ruff
Browse files Browse the repository at this point in the history
Thanks @LecrisUT

close #1892, #1893
  • Loading branch information
hgrecco committed Mar 9, 2024
1 parent bdf7d7b commit ed46b6e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
18 changes: 8 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
exclude: '^pint/_vendor'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
- id: black-jupyter
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.240'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.7
hooks:
- id: ruff
args: ["--fix"]
args: ["--fix", "--show-fixes"]
types_or: [ python, pyi, jupyter ]
- id: ruff-format
types_or: [ python, pyi, jupyter ]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
rev: 0.7.17
hooks:
- id: mdformat
additional_dependencies:
Expand Down
8 changes: 7 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
:target: https://pypi.python.org/pypi/pint
:alt: Latest Version

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
:target: https://github.com/python/black
:target: https://github.com/astral-sh/ruff
:alt: Ruff

.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/format.json
:target: https://github.com/astral-sh/ruff
:alt: Ruff-Format

.. image:: https://readthedocs.org/projects/pint/badge/
:target: https://pint.readthedocs.org/
Expand Down

0 comments on commit ed46b6e

Please sign in to comment.