Skip to content

Commit

Permalink
Switch to Ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Mar 15, 2024
1 parent ea1ea97 commit d729c39
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
11 changes: 4 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@ repos:
- id: detect-private-key
- id: no-commit-to-branch
args: ["--branch=main"]
- repo: https://github.com/psf/black
rev: "23.12.0"
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.1.7
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.2
hooks:
- id: ruff
args: ["--fix"]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.4
rev: v4.0.0-alpha.8
hooks:
- id: prettier
1 change: 0 additions & 1 deletion examples/rnn_dbscan_big.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
Tests RnnDBSCAN on a large dataset. Requires pandas.
"""
print(__doc__)

import numpy as np
from joblib import Memory
Expand Down
1 change: 0 additions & 1 deletion examples/rnn_dbscan_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
Mostly copypasted from sklearn's DBSCAN example.
"""
print(__doc__)

import numpy as np
from sklearn import metrics
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ addopts = [
# this will notify us when a test considered broken starts succeeding.
xfail_strict = true

[tool.ruff]
[tool.ruff.lint]
select = [
"F", # Pyflakes
"E", # Pycodestyle errors
Expand All @@ -70,9 +70,9 @@ ignore = [
# Don’t complain about “confusables”
"RUF001", "RUF002", "RUF003"
]
[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"examples/*.py" = ["E402"]
[tool.ruff.isort]
[tool.ruff.lint.isort]
known-first-party = ["sklearn_ann"]

[tool.hatch.envs.default]
Expand Down

0 comments on commit d729c39

Please sign in to comment.