From 9e6c5fd8ed692a9a8bdc98f51acc7cb31f2c58f8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 19:59:41 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v5.0.0) - [github.com/psf/black: 23.1.0 → 25.1.0](https://github.com/psf/black/compare/23.1.0...25.1.0) - [github.com/pycqa/flake8: 6.0.0 → 7.3.0](https://github.com/pycqa/flake8/compare/6.0.0...7.3.0) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d29162b8..708407c7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,16 +1,16 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 25.1.0 hooks: - id: black - repo: https://github.com/pycqa/flake8 - rev: 6.0.0 + rev: 7.3.0 hooks: - id: flake8 types: [file, python] From af4ba09f9339a968ea5f62b83382bf5c0579fcab Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 19:59:51 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/cluster/plot_kmedoids_digits.py | 1 + examples/eigenpro/plot_eigenpro_synthetic.py | 1 + examples/kernel_approximation/plot_kernel_approximation.py | 1 + examples/plot_clara_digits.py | 1 + sklearn_extra/cluster/_commonnn.py | 3 +-- sklearn_extra/cluster/tests/test_commonnn.py | 3 +-- sklearn_extra/cluster/tests/test_k_medoids.py | 1 + 7 files changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/cluster/plot_kmedoids_digits.py b/examples/cluster/plot_kmedoids_digits.py index 8bb7ab11..10e30683 100644 --- a/examples/cluster/plot_kmedoids_digits.py +++ b/examples/cluster/plot_kmedoids_digits.py @@ -5,6 +5,7 @@ In this example we compare different pairwise distance metrics for K-Medoids. """ + import numpy as np import matplotlib.pyplot as plt diff --git a/examples/eigenpro/plot_eigenpro_synthetic.py b/examples/eigenpro/plot_eigenpro_synthetic.py index 802f8a57..62696e9a 100644 --- a/examples/eigenpro/plot_eigenpro_synthetic.py +++ b/examples/eigenpro/plot_eigenpro_synthetic.py @@ -11,6 +11,7 @@ the number of features exceeds 500, it begins to outperform SVM and shows more stability. """ + print(__doc__) import matplotlib diff --git a/examples/kernel_approximation/plot_kernel_approximation.py b/examples/kernel_approximation/plot_kernel_approximation.py index 6b8dab52..8b4603bd 100644 --- a/examples/kernel_approximation/plot_kernel_approximation.py +++ b/examples/kernel_approximation/plot_kernel_approximation.py @@ -41,6 +41,7 @@ in :ref:`kernel_approximation`. """ + print(__doc__) # Author: Gael Varoquaux diff --git a/examples/plot_clara_digits.py b/examples/plot_clara_digits.py index a703c948..8697307a 100644 --- a/examples/plot_clara_digits.py +++ b/examples/plot_clara_digits.py @@ -5,6 +5,7 @@ In this example we compare different computation time of K-Medoids and CLARA on the handwritten digits data. """ + import numpy as np import matplotlib.pyplot as plt import time diff --git a/sklearn_extra/cluster/_commonnn.py b/sklearn_extra/cluster/_commonnn.py index 8d21d9a7..d86d2bc1 100644 --- a/sklearn_extra/cluster/_commonnn.py +++ b/sklearn_extra/cluster/_commonnn.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -"""Density-Based Common-Nearest-Neighbors Clustering -""" +"""Density-Based Common-Nearest-Neighbors Clustering""" # Author: Jan-Oliver Joswig # diff --git a/sklearn_extra/cluster/tests/test_commonnn.py b/sklearn_extra/cluster/tests/test_commonnn.py index 757878b4..b2c23e2f 100644 --- a/sklearn_extra/cluster/tests/test_commonnn.py +++ b/sklearn_extra/cluster/tests/test_commonnn.py @@ -1,5 +1,4 @@ -"""Tests for common-nearest neighbour clustering -""" +"""Tests for common-nearest neighbour clustering""" import pickle diff --git a/sklearn_extra/cluster/tests/test_k_medoids.py b/sklearn_extra/cluster/tests/test_k_medoids.py index 30f419a0..f18925e4 100644 --- a/sklearn_extra/cluster/tests/test_k_medoids.py +++ b/sklearn_extra/cluster/tests/test_k_medoids.py @@ -1,4 +1,5 @@ """Testing for K-Medoids""" + import warnings import numpy as np from unittest import mock