From f94d43ab51e6f45f7587cc369eac8173508b3156 Mon Sep 17 00:00:00 2001 From: Marc Oppenheimer Date: Fri, 20 Dec 2024 04:59:45 +0000 Subject: [PATCH] style: fmt --- requirements.txt | 64 ++++++++++++++++++++---------------------- src/events/tls.py | 2 +- tests/unit/test_tls.py | 5 ++-- 3 files changed, 35 insertions(+), 36 deletions(-) diff --git a/requirements.txt b/requirements.txt index 94f6c94d..0962a6e8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,33 +1,31 @@ -anyio==4.5.2 ; python_version >= "3.8" and python_version < "4.0" -attrs==24.2.0 ; python_version >= "3.8" and python_version < "4.0" -certifi==2024.8.30 ; python_version >= "3.8" and python_version < "4.0" -cffi==1.17.1 ; python_version >= "3.8" and python_version < "4.0" and platform_python_implementation != "PyPy" -charset-normalizer==3.4.0 ; python_version >= "3.8" and python_version < "4.0" -cosl==0.0.24 ; python_version >= "3.8" and python_version < "4.0" -cryptography==43.0.3 ; python_version >= "3.8" and python_version < "4.0" -exceptiongroup==1.2.2 ; python_version >= "3.8" and python_version < "3.11" -h11==0.14.0 ; python_version >= "3.8" and python_version < "4.0" -httpcore==1.0.7 ; python_version >= "3.8" and python_version < "4.0" -httpx==0.27.2 ; python_version >= "3.8" and python_version < "4.0" -idna==3.10 ; python_version >= "3.8" and python_version < "4.0" -importlib-resources==6.4.5 ; python_version >= "3.8" and python_version < "3.9" -jsonschema-specifications==2023.12.1 ; python_version >= "3.8" and python_version < "4.0" -jsonschema==4.23.0 ; python_version >= "3.8" and python_version < "4.0" -kazoo==2.10.0 ; python_version >= "3.8" and python_version < "4.0" -lightkube-models==1.31.1.8 ; python_version >= "3.8" and python_version < "4.0" -lightkube==0.15.0 ; python_version >= "3.8" and python_version < "4.0" -ops==2.17.0 ; python_version >= "3.8" and python_version < "4.0" -pkgutil-resolve-name==1.3.10 ; python_version >= "3.8" and python_version < "3.9" -pure-sasl==0.6.2 ; python_version >= "3.8" and python_version < "4.0" -pycparser==2.22 ; python_version >= "3.8" and python_version < "4.0" and platform_python_implementation != "PyPy" -pydantic==1.10.19 ; python_version >= "3.8" and python_version < "4.0" -pyyaml==6.0.2 ; python_version >= "3.8" and python_version < "4.0" -referencing==0.35.1 ; python_version >= "3.8" and python_version < "4.0" -requests==2.32.3 ; python_version >= "3.8" and python_version < "4.0" -rpds-py==0.20.1 ; python_version >= "3.8" and python_version < "4.0" -sniffio==1.3.1 ; python_version >= "3.8" and python_version < "4.0" -tenacity==9.0.0 ; python_version >= "3.8" and python_version < "4.0" -typing-extensions==4.12.2 ; python_version >= "3.8" and python_version < "4.0" -urllib3==2.2.3 ; python_version >= "3.8" and python_version < "4.0" -websocket-client==1.8.0 ; python_version >= "3.8" and python_version < "4.0" -zipp==3.20.2 ; python_version >= "3.8" and python_version < "3.9" +anyio==4.5.2 ; python_version >= "3.10" and python_version < "4.0" +attrs==24.2.0 ; python_version >= "3.10" and python_version < "4.0" +certifi==2024.8.30 ; python_version >= "3.10" and python_version < "4.0" +cffi==1.17.1 ; python_version >= "3.10" and python_version < "4.0" and platform_python_implementation != "PyPy" +charset-normalizer==3.4.0 ; python_version >= "3.10" and python_version < "4.0" +cosl==0.0.24 ; python_version >= "3.10" and python_version < "4.0" +cryptography==43.0.3 ; python_version >= "3.10" and python_version < "4.0" +exceptiongroup==1.2.2 ; python_version >= "3.10" and python_version < "3.11" +h11==0.14.0 ; python_version >= "3.10" and python_version < "4.0" +httpcore==1.0.7 ; python_version >= "3.10" and python_version < "4.0" +httpx==0.27.2 ; python_version >= "3.10" and python_version < "4.0" +idna==3.10 ; python_version >= "3.10" and python_version < "4.0" +jsonschema-specifications==2023.12.1 ; python_version >= "3.10" and python_version < "4.0" +jsonschema==4.23.0 ; python_version >= "3.10" and python_version < "4.0" +kazoo==2.10.0 ; python_version >= "3.10" and python_version < "4.0" +lightkube-models==1.31.1.8 ; python_version >= "3.10" and python_version < "4.0" +lightkube==0.15.0 ; python_version >= "3.10" and python_version < "4.0" +ops==2.17.0 ; python_version >= "3.10" and python_version < "4.0" +pure-sasl==0.6.2 ; python_version >= "3.10" and python_version < "4.0" +pycparser==2.22 ; python_version >= "3.10" and python_version < "4.0" and platform_python_implementation != "PyPy" +pydantic==1.10.19 ; python_version >= "3.10" and python_version < "4.0" +pyyaml==6.0.2 ; python_version >= "3.10" and python_version < "4.0" +referencing==0.35.1 ; python_version >= "3.10" and python_version < "4.0" +requests==2.32.3 ; python_version >= "3.10" and python_version < "4.0" +rpds-py==0.20.1 ; python_version >= "3.10" and python_version < "4.0" +sniffio==1.3.1 ; python_version >= "3.10" and python_version < "4.0" +tenacity==9.0.0 ; python_version >= "3.10" and python_version < "4.0" +trustme==1.2.0 ; python_version >= "3.10" and python_version < "4.0" +typing-extensions==4.12.2 ; python_version >= "3.10" and python_version < "4.0" +urllib3==2.2.3 ; python_version >= "3.10" and python_version < "4.0" +websocket-client==1.8.0 ; python_version >= "3.10" and python_version < "4.0" diff --git a/src/events/tls.py b/src/events/tls.py index 6978bf17..05cf2279 100644 --- a/src/events/tls.py +++ b/src/events/tls.py @@ -185,7 +185,7 @@ def _trusted_relation_changed(self, event: RelationChangedEvent) -> None: event.defer() return - relation_data = _load_relation_data(dict(event.relation.data[event.relation.app])) + relation_data = _load_relation_data(event.relation.data[event.relation.app]) provider_certificates = relation_data.get("certificates", []) if not provider_certificates: diff --git a/tests/unit/test_tls.py b/tests/unit/test_tls.py index f484aa1f..9a7692a5 100644 --- a/tests/unit/test_tls.py +++ b/tests/unit/test_tls.py @@ -3,8 +3,6 @@ # See LICENSE file for licensing details. import dataclasses -import trustme -from trustme import CA import json import logging import socket @@ -13,8 +11,10 @@ from unittest.mock import PropertyMock, patch import pytest +import trustme import yaml from ops.testing import Container, Context, PeerRelation, Relation, State +from trustme import CA from charm import KafkaCharm from literals import ( @@ -34,6 +34,7 @@ ACTIONS = yaml.safe_load(Path("./actions.yaml").read_text()) METADATA = yaml.safe_load(Path("./metadata.yaml").read_text()) + @pytest.fixture() def ca() -> CA: return trustme.CA()