Skip to content

Commit

Permalink
fix: use Union instead of | for type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasschaub committed Jul 7, 2024
1 parent 74c8df1 commit 50e6160
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/testcontainers/core/docker_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 50e6160

Please sign in to comment.