Skip to content

Commit b4c36a1

Browse files
committed
Add type annotations for arangodb.
1 parent a98c9e9 commit b4c36a1

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

arangodb/testcontainers/arangodb/__init__.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self,
4040
arango_root_password: str = "passwd",
4141
arango_no_auth: typing.Optional[bool] = None,
4242
arango_random_root_password: typing.Optional[bool] = None,
43-
**kwargs):
43+
**kwargs) -> None:
4444
"""
4545
Args:
4646
image: Actual docker image/tag to pull.
@@ -69,23 +69,16 @@ def __init__(self,
6969
else arango_random_root_password
7070
))
7171

72-
def _configure(self):
72+
def _configure(self) -> None:
7373
self.with_env("ARANGO_ROOT_PASSWORD", self.arango_root_password)
7474
if self.arango_no_auth:
7575
self.with_env("ARANGO_NO_AUTH", "1")
7676
if self.arango_random_root_password:
7777
self.with_env("ARANGO_RANDOM_ROOT_PASSWORD", "1")
7878

79-
def get_connection_url(self):
80-
# for now, single host over HTTP
81-
scheme = "http"
79+
def get_connection_url(self) -> str:
8280
port = self.get_exposed_port(self.port_to_expose)
83-
url = f"{scheme}://{self.get_container_host_ip()}:{port}"
81+
return f"http://{self.get_container_host_ip()}:{port}"
8482

85-
return url
86-
87-
def _connect(self):
88-
wait_for_logs(
89-
self,
90-
predicate="is ready for business",
91-
timeout=MAX_TRIES)
83+
def _connect(self) -> None:
84+
wait_for_logs(self, predicate="is ready for business", timeout=MAX_TRIES)

0 commit comments

Comments
 (0)