From fddd6018760d6bf1295a66f1e2c802279f4207a7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2026 17:38:11 +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/astral-sh/ruff-pre-commit: v0.15.22 → v0.16.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.22...v0.16.2) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cc78000..c94d5f8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: - id: end-of-file-fixer - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.22 + rev: v0.16.2 hooks: - id: ruff-check types_or: [python, pyi, jupyter] From 021fb7f08a3b8e91589828bdeb4ca994fb87354c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2026 17:38:29 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- notebook.ipynb | 2 +- test_area.py | 3 ++- test_text.py | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/notebook.ipynb b/notebook.ipynb index 204590a..0d49881 100644 --- a/notebook.ipynb +++ b/notebook.ipynb @@ -7,8 +7,8 @@ "metadata": {}, "outputs": [], "source": [ - "import pytest\n", "import ipytest\n", + "import pytest\n", "\n", "ipytest.autoconfig()" ] diff --git a/test_area.py b/test_area.py index 2afa735..6e65abd 100644 --- a/test_area.py +++ b/test_area.py @@ -1,6 +1,7 @@ -from area import area_of_square, area_of_rectangle import pytest +from area import area_of_rectangle, area_of_square + def test_area_of_square(): # for integers, we can simply assert they are equal diff --git a/test_text.py b/test_text.py index 09d1473..eb7b0f3 100644 --- a/test_text.py +++ b/test_text.py @@ -1,15 +1,15 @@ -from text import count_lines, count_characters, count_bytes import pytest import requests +from text import count_bytes, count_characters, count_lines + @pytest.fixture def test_file_generator(tmp_path): def _test_file(n_lines): filename = tmp_path / "temp_file.txt" with open(filename, "w") as f: - for _ in range(n_lines): - f.write("hello\n") + f.writelines("hello\n" for _ in range(n_lines)) return filename return _test_file