Skip to content

Commit

Permalink
use ruff in pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasdavis committed Dec 19, 2024
1 parent 6a79cdc commit 53744c6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 30 deletions.
25 changes: 2 additions & 23 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
language_version: python3
args:
- --target-version=py38
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.3
rev: v0.8.4
hooks:
- id: ruff
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
language_version: python3
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
args:
- --py38-plus
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
- id: ruff-format
5 changes: 3 additions & 2 deletions docs/dh_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
"outputs": [],
"source": [
"# dask_histogram --> boost-histogram fillable with dask collections.\n",
"import dask_histogram as dh\n",
"import boost_histogram as bh\n",
"import dask.array as da\n",
"import boost_histogram as bh"
"\n",
"import dask_histogram as dh"
]
},
{
Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ include = ["/src"]
addopts = "-v"
testpaths = ["tests"]

[tool.isort]
profile = "black"
line_length = 88
src_paths = ["src", "tests"]

[tool.mypy]
python_version = "3.9"
files = ["src", "tests"]
Expand All @@ -108,6 +103,10 @@ ignore_missing_imports = true
[tool.pydocstyle]
ignore = "D105"

[tool.ruff]
line-length = 88
src = ["src", "tests"]

[tool.ruff.lint]
ignore = ["E501"]
per-file-ignores = {"__init__.py" = ["E402", "F401"]}

0 comments on commit 53744c6

Please sign in to comment.