Skip to content

Commit

Permalink
use ruff auto-fix, use ruff isort rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Jan 2, 2025
1 parent a4c297c commit 374db01
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
8 changes: 1 addition & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@ repos:
- id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args: ["--settings-path", "pyproject.toml"]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.4
hooks:
# Run the linter.
- id: ruff
args: ["--config", "pyproject.toml"]
args: ["--config", "pyproject.toml", "--fix"]
# Run the formatter.
- id: ruff-format
args: ["--config", "pyproject.toml"]
Expand Down
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[tool.isort]
line_length = 88
profile = "black"

[tool.ruff]
line-length = 88
target-version = "py39"
Expand Down Expand Up @@ -54,6 +50,8 @@ select = [
"FIX",
# flynt
"FLY",
# isort
"I",
# perflint
"PERF",
# pygrep-hooks
Expand Down
2 changes: 0 additions & 2 deletions recent-developments-in-lightgbm/local.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@
"outputs": [],
"source": [
"import dask.array as da\n",
"\n",
"from dask.distributed import Client, LocalCluster, wait\n",
"\n",
"from lightgbm.dask import DaskLGBMRegressor"
]
},
Expand Down

0 comments on commit 374db01

Please sign in to comment.