Skip to content

Commit 18b49d4

Browse files
authored
Switch to ruff (#10)
1 parent aea4eb2 commit 18b49d4

File tree

17 files changed

+169
-206
lines changed

17 files changed

+169
-206
lines changed

.github/workflows/pytest.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ jobs:
2525
- name: Poetry install
2626
run: |
2727
poetry lock --check
28-
poetry install --extras tests --extras docs --extras annlibs
28+
poetry install --with test,dev --extras annlibs
2929
3030
- name: Run test suite
3131
run: |
3232
poetry run pytest -v --color=yes
3333
34-
- name: Run black
34+
- name: Run formatter
3535
run: |
36-
poetry run black --check sklearn_ann
36+
poetry run black --check .
3737
38-
- name: Run flake8
38+
- name: Run style checks
3939
run: |
40-
poetry run flake8 sklearn_ann
40+
poetry run ruff .

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
__pycache__/
2+
/*cache/
23
docs/_build/
34
activate.sh
45

docs/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import sphinx_rtd_theme
1818

19-
2019
# -- Project information -----------------------------------------------------
2120

2221
project = "sklearn-ann"

examples/rnn_dbscan_big.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
=======================================================
43
Demo of RnnDBSCAN clustering algorithm on large dataset
@@ -11,10 +10,10 @@
1110

1211
import numpy as np
1312
from joblib import Memory
13+
from sklearn import metrics
14+
from sklearn.datasets import fetch_openml
1415

1516
from sklearn_ann.cluster.rnn_dbscan import simple_rnn_dbscan_pipeline
16-
from sklearn.datasets import fetch_openml
17-
from sklearn import metrics
1817

1918

2019
# #############################################################################

examples/rnn_dbscan_simple.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
===================================
43
Demo of RNN-DBSCAN clustering algorithm
@@ -12,12 +11,11 @@
1211
print(__doc__)
1312

1413
import numpy as np
15-
16-
from sklearn_ann.cluster.rnn_dbscan import RnnDBSCAN
1714
from sklearn import metrics
1815
from sklearn.datasets import make_blobs
1916
from sklearn.preprocessing import StandardScaler
2017

18+
from sklearn_ann.cluster.rnn_dbscan import RnnDBSCAN
2119

2220
# #############################################################################
2321
# Generate sample data

0 commit comments

Comments
 (0)