Skip to content

Commit 5101e66

Browse files
committed
lint plus warnings as errors
1 parent 53ad7b8 commit 5101e66

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

examples/pcovr/PCovR-WHODataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
r_pcovr = Ridge(alpha=1e-4, fit_intercept=False, random_state=0).fit(
110110
T_train_pcovr, y_train
111111
)
112-
yp_pcovr = r_pcovr.predict(T_test_pcovr).reshape(-1,1)
112+
yp_pcovr = r_pcovr.predict(T_test_pcovr).reshape(-1, 1)
113113

114114
plt.scatter(y_scaler.inverse_transform(y_test), y_scaler.inverse_transform(yp_pcovr))
115115
r_pcovr.score(T_test_pcovr, y_test)
@@ -128,7 +128,7 @@
128128
T_pca = pca.transform(X)
129129

130130
r_pca = Ridge(alpha=1e-4, fit_intercept=False, random_state=0).fit(T_train_pca, y_train)
131-
yp_pca = r_pca.predict(T_test_pca).reshape(-1,1)
131+
yp_pca = r_pca.predict(T_test_pca).reshape(-1, 1)
132132

133133
plt.scatter(y_scaler.inverse_transform(y_test), y_scaler.inverse_transform(yp_pca))
134134
r_pca.score(T_test_pca, y_test)

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ include_trailing_comma = true
8484
lines_after_imports = 2
8585
known_first_party = "skmatter"
8686

87+
[tool.pytest.ini_options]
88+
testpaths = ["tests"]
89+
addopts = ["--cov"]
90+
filterwarnings = ["error"]
91+
8792
[tool.ruff]
8893
exclude = ["docs/src/examples/"]
8994
lint.ignore = [

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ deps =
4242

4343
commands =
4444
# Run unit tests
45-
pytest --cov {posargs}
45+
pytest {posargs}
4646

4747
# Run documentation tests
4848
pytest --doctest-modules --pyargs skmatter {posargs}

0 commit comments

Comments
 (0)