Skip to content

Commit 53744c6

Browse files
committed
use ruff in pre-commit
1 parent 6a79cdc commit 53744c6

File tree

3 files changed

+9
-30
lines changed

3 files changed

+9
-30
lines changed

.pre-commit-config.yaml

+2-23
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,6 @@
11
repos:
2-
- repo: https://github.com/psf/black
3-
rev: 24.10.0
4-
hooks:
5-
- id: black
6-
language_version: python3
7-
args:
8-
- --target-version=py38
92
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: v0.8.3
3+
rev: v0.8.4
114
hooks:
125
- id: ruff
13-
- repo: https://github.com/PyCQA/isort
14-
rev: 5.13.2
15-
hooks:
16-
- id: isort
17-
language_version: python3
18-
- repo: https://github.com/asottile/pyupgrade
19-
rev: v3.19.0
20-
hooks:
21-
- id: pyupgrade
22-
args:
23-
- --py38-plus
24-
- repo: https://github.com/MarcoGorelli/absolufy-imports
25-
rev: v0.3.1
26-
hooks:
27-
- id: absolufy-imports
6+
- id: ruff-format

docs/dh_demo.ipynb

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
"outputs": [],
99
"source": [
1010
"# dask_histogram --> boost-histogram fillable with dask collections.\n",
11-
"import dask_histogram as dh\n",
11+
"import boost_histogram as bh\n",
1212
"import dask.array as da\n",
13-
"import boost_histogram as bh"
13+
"\n",
14+
"import dask_histogram as dh"
1415
]
1516
},
1617
{

pyproject.toml

+4-5
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,6 @@ include = ["/src"]
8383
addopts = "-v"
8484
testpaths = ["tests"]
8585

86-
[tool.isort]
87-
profile = "black"
88-
line_length = 88
89-
src_paths = ["src", "tests"]
90-
9186
[tool.mypy]
9287
python_version = "3.9"
9388
files = ["src", "tests"]
@@ -108,6 +103,10 @@ ignore_missing_imports = true
108103
[tool.pydocstyle]
109104
ignore = "D105"
110105

106+
[tool.ruff]
107+
line-length = 88
108+
src = ["src", "tests"]
109+
111110
[tool.ruff.lint]
112111
ignore = ["E501"]
113112
per-file-ignores = {"__init__.py" = ["E402", "F401"]}

0 commit comments

Comments
 (0)