Skip to content

Commit

Permalink
fix: add args/kwargs: Any
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverlambson committed Jun 30, 2024
1 parent e9fe44c commit 87076fb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions modules/mailpit/testcontainers/mailpit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import os
import tempfile
from datetime import datetime, timedelta, timezone
from typing import TYPE_CHECKING, NamedTuple
from typing import TYPE_CHECKING, Any, NamedTuple

from cryptography import x509
from cryptography.hazmat.primitives import hashes, serialization
Expand All @@ -29,9 +29,7 @@
from testcontainers.core.waiting_utils import wait_for_logs

if TYPE_CHECKING:
from typing_extensions import ParamSpec, Self

P = ParamSpec("P")
from typing_extensions import Self


class MailpitUser(NamedTuple):
Expand Down Expand Up @@ -73,15 +71,15 @@ class MailpitContainer(DockerContainer):
... # use server.sendmail(...) to send emails
"""

def __init__( # type: ignore[no-untyped-def]
def __init__(
self,
image: str = "axllent/mailpit",
*,
smtp_port: int = 1025,
ui_port: int = 8025,
users: list[MailpitUser] | None = None,
require_tls: bool = False,
**kwargs,
**kwargs: Any,
) -> None:
super().__init__(image=image, **kwargs)
self.smtp_port = smtp_port
Expand Down Expand Up @@ -127,7 +125,7 @@ def start(self) -> Self:
wait_for_logs(self, ".*accessible via.*")
return self

def stop(self, *args, **kwargs) -> None:
def stop(self, *args: Any, **kwargs: Any) -> None:
super().stop(*args, **kwargs)
os.remove(self.tls_key_file)
os.remove(self.tls_cert_file)
Expand Down

0 comments on commit 87076fb

Please sign in to comment.