Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move to Ruff formatter #895

Merged
merged 3 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,11 @@ ci:
autofix_commit_msg: "style: pre-commit fixes"

repos:
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.11.0
hooks:
- id: black-jupyter

- repo: https://github.com/adamchainz/blacken-docs
rev: "1.16.0"
hooks:
- id: blacken-docs
additional_dependencies: [black==23.11.0]
additional_dependencies: [black==23.*]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
Expand Down Expand Up @@ -52,10 +47,12 @@ repos:
]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.5"
rev: "v0.1.6"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format
types_or: [python, pyi, jupyter]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.0
Expand Down Expand Up @@ -86,7 +83,7 @@ repos:
exclude: .pre-commit-config.yaml

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.4
rev: v17.0.5
hooks:
- id: clang-format
types_or: [c++]
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

[![Actions Status][actions-badge]][actions-link]
[![Documentation Status][rtd-badge]][rtd-link]
[![Code style: black][black-badge]][black-link]

[![PyPI version][pypi-version]][pypi-link]
[![Conda-Forge][conda-badge]][conda-link]
Expand Down Expand Up @@ -290,8 +289,6 @@ Support for this work was provided by the National Science Foundation cooperativ

[actions-badge]: https://github.com/scikit-hep/boost-histogram/workflows/Tests/badge.svg
[actions-link]: https://github.com/scikit-hep/boost-histogram/actions
[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
[black-link]: https://github.com/psf/black
[conda-badge]: https://img.shields.io/conda/vn/conda-forge/boost-histogram
[conda-link]: https://github.com/conda-forge/boost-histogram-feedstock
[github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
Expand Down
4 changes: 1 addition & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Welcome to boost-histogram's documentation!
===========================================

|Actions Status| |Documentation Status| |Code style: black| |PyPI version| |Conda-Forge|
|Actions Status| |Documentation Status| |PyPI version| |Conda-Forge|
|PyPI platforms| |DOI| |GitHub Discussion| |Gitter| |Scikit-HEP|

Boost-histogram (`source <https://github.com/scikit-hep/boost-histogram>`__) is
Expand Down Expand Up @@ -116,8 +116,6 @@ Indices and tables
:target: https://github.com/scikit-hep/boost-histogram/actions
.. |Documentation Status| image:: https://readthedocs.org/projects/boost-histogram/badge/?version=latest
:target: https://boost-histogram.readthedocs.io/en/latest/?badge=latest
.. |Code style: black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black
.. |PyPI version| image:: https://badge.fury.io/py/boost-histogram.svg
:target: https://pypi.org/project/boost-histogram
.. |Conda-Forge| image:: https://img.shields.io/conda/vn/conda-forge/boost-histogram
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ extend-select = [
ignore = [
"PLR", # Design related pylint codes
"E501", # Line too long
"PT011", "PT013"
"PT011", "PT013", # Incorrect pytest codes
"ISC001", # Conflicts with the formatter
]
unfixable = [
"T20", # Removes print statements
Expand Down
Loading