From f65ee70de68d9dfeab6218ecce1a38e1c3ea4c13 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 20:26:23 +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.6.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v6.0.0) - [github.com/asottile/pyupgrade: v3.17.0 → v3.21.2](https://github.com/asottile/pyupgrade/compare/v3.17.0...v3.21.2) - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 24.8.0 → 26.3.1](https://github.com/psf/black-pre-commit-mirror/compare/24.8.0...26.3.1) - [github.com/PyCQA/isort: 5.13.2 → 8.0.1](https://github.com/PyCQA/isort/compare/5.13.2...8.0.1) - [github.com/PyCQA/flake8: 7.1.1 → 7.3.0](https://github.com/PyCQA/flake8/compare/7.1.1...7.3.0) - [github.com/pre-commit/mirrors-mypy: v1.11.2 → v1.20.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.11.2...v1.20.1) - [github.com/PyCQA/bandit: 1.7.0 → 1.9.4](https://github.com/PyCQA/bandit/compare/1.7.0...1.9.4) - [github.com/zricethezav/gitleaks: v8.0.4 → v8.30.0](https://github.com/zricethezav/gitleaks/compare/v8.0.4...v8.30.0) --- .pre-commit-config.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a0f4c06a..cebe1153 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,9 +1,9 @@ exclude: "^docs/|/migrations/" -default_stages: [commit] +default_stages: [pre-commit] repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -12,30 +12,30 @@ repos: - id: debug-statements - repo: https://github.com/asottile/pyupgrade - rev: v3.17.0 + rev: v3.21.2 hooks: - id: pyupgrade args: [--py310-plus] - - repo: https://github.com/psf/black - rev: 24.8.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.3.1 hooks: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.13.2 + rev: 8.0.1 hooks: - id: isort - repo: https://github.com/PyCQA/flake8 - rev: 7.1.1 + rev: 7.3.0 hooks: - id: flake8 args: ["--config=setup.cfg"] additional_dependencies: [flake8-isort] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.2 + rev: v1.20.1 hooks: - id: mypy args: ["--strict"] @@ -61,7 +61,7 @@ repos: - types-requests - repo: https://github.com/PyCQA/bandit - rev: "1.7.0" + rev: "1.9.4" hooks: - id: bandit args: ["-r", "--configfile=bandit-config.yml"] @@ -69,7 +69,7 @@ repos: - pbr - repo: https://github.com/zricethezav/gitleaks - rev: "v8.0.4" + rev: "v8.30.0" hooks: - id: gitleaks args: ["--config=gitleaks-config.toml"] From 7ffefe50cae1d514f4cc262f20c2e42fa919b00b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 20:27:11 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- document_classifier/encoder.py | 2 +- document_classifier/load_dataset.py | 2 +- .../frontend/test_pattern_application.py | 24 +++++++------------ 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/document_classifier/encoder.py b/document_classifier/encoder.py index 1bacc5d9..bcd250e0 100644 --- a/document_classifier/encoder.py +++ b/document_classifier/encoder.py @@ -1,4 +1,4 @@ -""" Encoding the url response """ +"""Encoding the url response""" import pandas as pd diff --git a/document_classifier/load_dataset.py b/document_classifier/load_dataset.py index d61efdad..8b1d6216 100644 --- a/document_classifier/load_dataset.py +++ b/document_classifier/load_dataset.py @@ -1,4 +1,4 @@ -""" Module for loading dataset """ +"""Module for loading dataset""" from torch.utils.data import DataLoader, SequentialSampler, TensorDataset diff --git a/sde_collections/tests/frontend/test_pattern_application.py b/sde_collections/tests/frontend/test_pattern_application.py index 632c5e29..e6449e16 100644 --- a/sde_collections/tests/frontend/test_pattern_application.py +++ b/sde_collections/tests/frontend/test_pattern_application.py @@ -42,13 +42,11 @@ def test_create_exclude_pattern(self): add_pattern_button.click() # Fill up the form using JavaScript and close modal properly - self.driver.execute_script( - """ + self.driver.execute_script(""" document.querySelector("#excludePatternModal #match_pattern_input").value = 'example.com/docs/'; document.querySelector('#excludePatternModal .pattern_type_form_select[value="2"]').click(); document.querySelector("#excludePatternModal button.btn-primary[type='submit']").click(); - """ - ) + """) # Verify pattern details pattern_row = self.wait.until( @@ -81,13 +79,11 @@ def test_create_include_pattern(self): add_pattern_button.click() # Fill up the form using JavaScript and close modal properly - self.driver.execute_script( - """ + self.driver.execute_script(""" document.querySelector("#includePatternModal #match_pattern_input").value = 'example.com/docs/'; document.querySelector('#includePatternModal .pattern_type_form_select[value="2"]').click(); document.querySelector("#includePatternModal button.btn-primary[type='submit']").click(); - """ - ) + """) # Verify pattern details pattern_row = self.wait.until( @@ -120,14 +116,12 @@ def test_create_title_pattern(self): add_pattern_button.click() # Fill up the form using JavaScript and close modal properly - self.driver.execute_script( - """ + self.driver.execute_script(""" document.querySelector("#titlePatternModal #match_pattern_input").value = 'example.com/docs/'; document.querySelector("#titlePatternModal #title_pattern_input").value = 'Documentation: {title}'; document.querySelector('#titlePatternModal .pattern_type_form_select[value="2"]').click(); document.querySelector("#titlePatternModal button.btn-primary[type='submit']").click(); - """ - ) + """) # Verify pattern details pattern_row = self.wait.until( @@ -172,14 +166,12 @@ def test_create_documenttype_pattern(self): add_pattern_button.click() # Fill up the form using JavaScript and close modal properly - self.driver.execute_script( - """ + self.driver.execute_script(""" document.querySelector("#documentTypePatternModal #match_pattern_input").value = 'example.com/docs/'; document.querySelector('#documentTypePatternModal .document_type_form_select[value="2"]').click(); // DATA document.querySelector('#documentTypePatternModal .pattern_type_form_select[value="2"]').click(); document.querySelector("#documentTypePatternModal button.btn-primary[type='submit']").click(); - """ - ) + """) # Verify pattern details pattern_row = self.wait.until(