diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 322fae72..0899b7ee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: check-yaml - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black diff --git a/src/caselawclient/models/neutral_citation_mixin.py b/src/caselawclient/models/neutral_citation_mixin.py index c800f78f..a33747ba 100644 --- a/src/caselawclient/models/neutral_citation_mixin.py +++ b/src/caselawclient/models/neutral_citation_mixin.py @@ -19,20 +19,21 @@ class NeutralCitationMixin: """ def __init__(self, document_noun: str, *args: Any, **kwargs: Any) -> None: - self.attributes_to_validate: list[ - tuple[str, bool, str] - ] = self.attributes_to_validate + [ - ( - "has_ncn", - True, - f"This {document_noun} has no neutral citation number", - ), - ( - "has_valid_ncn", - True, - f"The neutral citation number of this {document_noun} is not valid", - ), - ] + self.attributes_to_validate: list[tuple[str, bool, str]] = ( + self.attributes_to_validate + + [ + ( + "has_ncn", + True, + f"This {document_noun} has no neutral citation number", + ), + ( + "has_valid_ncn", + True, + f"The neutral citation number of this {document_noun} is not valid", + ), + ] + ) super(NeutralCitationMixin, self).__init__(*args, **kwargs) diff --git a/src/caselawclient/models/utilities/aws.py b/src/caselawclient/models/utilities/aws.py index 38d53fcb..5f7a06ad 100644 --- a/src/caselawclient/models/utilities/aws.py +++ b/src/caselawclient/models/utilities/aws.py @@ -30,13 +30,11 @@ class ParserInstructionsDict(TypedDict): @overload -def create_aws_client(service: Literal["s3"]) -> S3Client: - ... +def create_aws_client(service: Literal["s3"]) -> S3Client: ... @overload -def create_aws_client(service: Literal["sns"]) -> SNSClient: - ... +def create_aws_client(service: Literal["sns"]) -> SNSClient: ... def create_aws_client(service: Union[Literal["s3"], Literal["sns"]]) -> Any: diff --git a/tests/models/test_documents.py b/tests/models/test_documents.py index 0a020b77..75322eee 100644 --- a/tests/models/test_documents.py +++ b/tests/models/test_documents.py @@ -214,9 +214,9 @@ def test_document_versions_happy_case(self, mock_api_client): {"uri": "test/1234_xml_versions/2-1234.xml"}, {"uri": "test/1234_xml_versions/1-1234.xml"}, ] - version_document.versions_as_documents[ - 0 - ].uri = "test/1234_xml_versions/2-1234.xml" + version_document.versions_as_documents[0].uri = ( + "test/1234_xml_versions/2-1234.xml" + ) def test_document_version_number_when_not_version(self, mock_api_client): base_document = Document("test/1234", mock_api_client)