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] 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