Skip to content

Commit 5fee5ad

Browse files
authored
MNT Make ruff check line-too-long (E501) (scikit-learn#31214)
1 parent 32aa82d commit 5fee5ad

8 files changed

+8
-8
lines changed

examples/covariance/plot_mahalanobis_distances.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
Proceedings of the National Academy of Sciences of the United States
6161
of America, 17, 684-688.
6262
63-
"""
63+
""" # noqa: E501
6464

6565
# Authors: The scikit-learn developers
6666
# SPDX-License-Identifier: BSD-3-Clause

examples/feature_selection/plot_rfe_digits.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
1717
See also :ref:`sphx_glr_auto_examples_feature_selection_plot_rfe_with_cross_validation.py`
1818
19-
"""
19+
""" # noqa: E501
2020

2121
# Authors: The scikit-learn developers
2222
# SPDX-License-Identifier: BSD-3-Clause

examples/feature_selection/plot_select_from_model_diabetes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# were already standardized.
4141
# For a more complete example on the interpretations of the coefficients of
4242
# linear models, you may refer to
43-
# :ref:`sphx_glr_auto_examples_inspection_plot_linear_model_coefficient_interpretation.py`.
43+
# :ref:`sphx_glr_auto_examples_inspection_plot_linear_model_coefficient_interpretation.py`. # noqa: E501
4444
import matplotlib.pyplot as plt
4545
import numpy as np
4646

examples/miscellaneous/plot_partial_dependence_visualization_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
1212
See also :ref:`sphx_glr_auto_examples_miscellaneous_plot_roc_curve_visualization_api.py`
1313
14-
"""
14+
""" # noqa: E501
1515

1616
# Authors: The scikit-learn developers
1717
# SPDX-License-Identifier: BSD-3-Clause

examples/text/plot_document_classification_20newsgroups.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def benchmark(clf, custom_name=False):
356356
# Notice that the most important hyperparameters values were tuned using a grid
357357
# search procedure not shown in this notebook for the sake of simplicity. See
358358
# the example script
359-
# :ref:`sphx_glr_auto_examples_model_selection_plot_grid_search_text_feature_extraction.py`
359+
# :ref:`sphx_glr_auto_examples_model_selection_plot_grid_search_text_feature_extraction.py` # noqa: E501
360360
# for a demo on how such tuning can be done.
361361

362362
from sklearn.ensemble import RandomForestClassifier

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ preview = true
137137
# This enables us to use the explicit preview rules that we want only
138138
explicit-preview-rules = true
139139
# all rules can be found here: https://docs.astral.sh/ruff/rules/
140-
extend-select = ["W", "I", "CPY001", "RUF"]
140+
extend-select = ["E501", "W", "I", "CPY001", "RUF"]
141141
ignore=[
142142
# do not assign a lambda expression, use a def
143143
"E731",

sklearn/datasets/tests/test_openml.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def _mock_urlopen_download_data(url, has_gzip_header):
141141
# For simplicity the mock filenames don't contain the filename, i.e.
142142
# the last part of the data description url after the last /.
143143
# For example for id_1, data description download url is:
144-
# gunzip -c sklearn/datasets/tests/data/openml/id_1/api-v1-jd-1.json.gz | grep '"url"
144+
# gunzip -c sklearn/datasets/tests/data/openml/id_1/api-v1-jd-1.json.gz | grep '"url" # noqa: E501
145145
# "https:\/\/www.openml.org\/data\/v1\/download\/1\/anneal.arff"
146146
# but the mock filename does not contain anneal.arff and is:
147147
# sklearn/datasets/tests/data/openml/id_1/data-v1-dl-1.arff.gz.

sklearn/utils/tests/test_pprint.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def test_gridsearch_pipeline(print_changed_only_false):
444444
score_func=<function chi2 at some_address>)],
445445
'reduce_dim__k': [2, 4, 8]}],
446446
pre_dispatch='2*n_jobs', refit=True, return_train_score=False,
447-
scoring=None, verbose=0)"""
447+
scoring=None, verbose=0)""" # noqa: E501
448448

449449
expected = expected[1:] # remove first \n
450450
repr_ = pp.pformat(gspipline)

0 commit comments

Comments
 (0)