Skip to content

MNT Make ruff check line-too-long (E501) #31214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/covariance/plot_mahalanobis_distances.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
Proceedings of the National Academy of Sciences of the United States
of America, 17, 684-688.

"""
""" # noqa: E501

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause
Expand Down
2 changes: 1 addition & 1 deletion examples/feature_selection/plot_rfe_digits.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

See also :ref:`sphx_glr_auto_examples_feature_selection_plot_rfe_with_cross_validation.py`

"""
""" # noqa: E501

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# were already standardized.
# For a more complete example on the interpretations of the coefficients of
# linear models, you may refer to
# :ref:`sphx_glr_auto_examples_inspection_plot_linear_model_coefficient_interpretation.py`.
# :ref:`sphx_glr_auto_examples_inspection_plot_linear_model_coefficient_interpretation.py`. # noqa: E501
import matplotlib.pyplot as plt
import numpy as np

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

See also :ref:`sphx_glr_auto_examples_miscellaneous_plot_roc_curve_visualization_api.py`

"""
""" # noqa: E501

# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause
Expand Down
2 changes: 1 addition & 1 deletion examples/text/plot_document_classification_20newsgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def benchmark(clf, custom_name=False):
# Notice that the most important hyperparameters values were tuned using a grid
# search procedure not shown in this notebook for the sake of simplicity. See
# the example script
# :ref:`sphx_glr_auto_examples_model_selection_plot_grid_search_text_feature_extraction.py`
# :ref:`sphx_glr_auto_examples_model_selection_plot_grid_search_text_feature_extraction.py` # noqa: E501
# for a demo on how such tuning can be done.

from sklearn.ensemble import RandomForestClassifier
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ preview = true
# This enables us to use the explicit preview rules that we want only
explicit-preview-rules = true
# all rules can be found here: https://docs.astral.sh/ruff/rules/
extend-select = ["W", "I", "CPY001", "RUF"]
extend-select = ["E501", "W", "I", "CPY001", "RUF"]
ignore=[
# do not assign a lambda expression, use a def
"E731",
Expand Down
2 changes: 1 addition & 1 deletion sklearn/datasets/tests/test_openml.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def _mock_urlopen_download_data(url, has_gzip_header):
# For simplicity the mock filenames don't contain the filename, i.e.
# the last part of the data description url after the last /.
# For example for id_1, data description download url is:
# gunzip -c sklearn/datasets/tests/data/openml/id_1/api-v1-jd-1.json.gz | grep '"url"
# gunzip -c sklearn/datasets/tests/data/openml/id_1/api-v1-jd-1.json.gz | grep '"url" # noqa: E501
# "https:\/\/www.openml.org\/data\/v1\/download\/1\/anneal.arff"
# but the mock filename does not contain anneal.arff and is:
# sklearn/datasets/tests/data/openml/id_1/data-v1-dl-1.arff.gz.
Expand Down
2 changes: 1 addition & 1 deletion sklearn/utils/tests/test_pprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def test_gridsearch_pipeline(print_changed_only_false):
score_func=<function chi2 at some_address>)],
'reduce_dim__k': [2, 4, 8]}],
pre_dispatch='2*n_jobs', refit=True, return_train_score=False,
scoring=None, verbose=0)"""
scoring=None, verbose=0)""" # noqa: E501

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