From e87e782fcedb6bb000355133d922b62a5409dd88 Mon Sep 17 00:00:00 2001 From: Matthias Schaub Date: Sun, 7 Jul 2024 10:21:20 +0200 Subject: [PATCH] fix: use Union instead of | for type hint --- core/testcontainers/core/docker_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/testcontainers/core/docker_client.py b/core/testcontainers/core/docker_client.py index 674b2ed6..418a842f 100644 --- a/core/testcontainers/core/docker_client.py +++ b/core/testcontainers/core/docker_client.py @@ -215,7 +215,7 @@ def client_networks_create(self, name: str, param: dict): labels = create_labels("", param.get("labels")) return self.client.networks.create(name, **{**param, "labels": labels}) - def find_container_by_hash(self, hash_: str) -> Container | None: + def find_container_by_hash(self, hash_: str) -> Union[Container, None]: for container in self.client.containers.list(all=True): if container.labels.get("hash", None) == hash_: return container