diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ab0576ca1..2c9bb51e3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: - id: check-json - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black diff --git a/src/abbreviation_extraction/abbreviations_matcher.py b/src/abbreviation_extraction/abbreviations_matcher.py index c545d83a3..bd9a39878 100644 --- a/src/abbreviation_extraction/abbreviations_matcher.py +++ b/src/abbreviation_extraction/abbreviations_matcher.py @@ -3,7 +3,6 @@ AbbreviationDetector class and the pipeline. """ - from collections import namedtuple from spacy.language import Language diff --git a/src/database/db_connection.py b/src/database/db_connection.py index d50f71696..39510e199 100644 --- a/src/database/db_connection.py +++ b/src/database/db_connection.py @@ -1,6 +1,5 @@ """ Handles the database connection """ - from typing import Any import pandas as pd diff --git a/src/lambdas/update_legislation_table/update_legislation_table/tests/test_fetch_legislation.py b/src/lambdas/update_legislation_table/update_legislation_table/tests/test_fetch_legislation.py index 3eed820df..e34511dcd 100644 --- a/src/lambdas/update_legislation_table/update_legislation_table/tests/test_fetch_legislation.py +++ b/src/lambdas/update_legislation_table/update_legislation_table/tests/test_fetch_legislation.py @@ -6,7 +6,6 @@ 'SPARQL_USERNAME' and 'SPARQL_PASSWORD'. """ - import datetime import os from unittest.mock import patch diff --git a/src/legislation_provisions_extraction/legislation_provisions.py b/src/legislation_provisions_extraction/legislation_provisions.py index f7350d127..37034d7ba 100644 --- a/src/legislation_provisions_extraction/legislation_provisions.py +++ b/src/legislation_provisions_extraction/legislation_provisions.py @@ -12,6 +12,7 @@ 2. "Section 27(A)" - currently miss these references when replacing 3. Sub-sections aren't being replaced """ + import os import re from typing import Any, Dict, List diff --git a/src/tests/oblique_reference_extraction_tests/test_oblique_references.py b/src/tests/oblique_reference_extraction_tests/test_oblique_references.py index 93576ceb3..00f6bb947 100644 --- a/src/tests/oblique_reference_extraction_tests/test_oblique_references.py +++ b/src/tests/oblique_reference_extraction_tests/test_oblique_references.py @@ -1,6 +1,5 @@ """Tests the `oblique_references` module""" - import re import unittest from pathlib import Path diff --git a/src/utils/tests/conftest.py b/src/utils/tests/conftest.py index 6fe0b31bf..14a8e4b8e 100644 --- a/src/utils/tests/conftest.py +++ b/src/utils/tests/conftest.py @@ -1,4 +1,5 @@ """Fixtures for utils tests""" + import boto3 import pytest from moto import mock_secretsmanager diff --git a/src/utils/tests/test_initialise_db.py b/src/utils/tests/test_initialise_db.py index 92d442ad8..e21218712 100644 --- a/src/utils/tests/test_initialise_db.py +++ b/src/utils/tests/test_initialise_db.py @@ -1,4 +1,5 @@ """Unit tests for the initialise_db module""" + from unittest import mock from mock import MagicMock