From 260d51ba055449ac85d97f883f8b2e8712c3abae Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 16:37:58 +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.5.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v6.0.0) - [github.com/PyCQA/flake8: 6.1.0 → 7.3.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.3.0) - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 23.10.1 → 26.1.0](https://github.com/psf/black-pre-commit-mirror/compare/23.10.1...26.1.0) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4f44e01..118f36d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ exclude: > repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v6.0.0 hooks: - id: check-json - id: check-yaml @@ -17,11 +17,11 @@ repos: - id: trailing-whitespace - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.3.0 hooks: - id: flake8 - - repo: https://github.com/psf/black - rev: 23.10.1 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.1.0 hooks: - id: black From df335acaad134bd4770ac9c6de3ac3d3fd156a0e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 16:39:08 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- setup.py | 6 ++---- sphinx_copybutton/__init__.py | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 6fa6fc7..f50db9c 100644 --- a/setup.py +++ b/setup.py @@ -11,12 +11,10 @@ if os.path.isdir("clipboard.js") and not os.path.isfile( "clipboard.js/dist/clipboard.min.js" ): - raise SystemExit( - """Error: clipboard.js submodule not available, run + raise SystemExit("""Error: clipboard.js submodule not available, run git submodule update --init - """ - ) + """) with open("./README.md") as ff: readme_text = ff.read() diff --git a/sphinx_copybutton/__init__.py b/sphinx_copybutton/__init__.py index 953e7f3..62c90c3 100644 --- a/sphinx_copybutton/__init__.py +++ b/sphinx_copybutton/__init__.py @@ -1,4 +1,5 @@ """A small sphinx extension to add "copy" buttons to code blocks.""" + from pathlib import Path from sphinx.util import logging