Skip to content

Commit c3faae0

Browse files
committed
resolve a few other issues
1 parent 513cec5 commit c3faae0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/shecan/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def reset() -> None:
2929
conf.delete()
3030

3131

32-
def list_dns():
32+
def list_dns() -> list[str]:
3333
"""Return a list of DNS objects."""
3434
with ShecanConfig() as conf:
3535
ips = conf.list_dns()

src/shecan/db.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from configparser import ConfigParser
44
from pathlib import Path
5+
from typing import Self
56

67
DB_PATH = Path("~/.dns_db.cfg").expanduser()
78

@@ -25,7 +26,7 @@ def _read_config(self) -> None:
2526
self._initialize()
2627
self._parser.read(self.config_file)
2728

28-
def __enter__(self):
29+
def __enter__(self) -> Self:
2930
self._read_config()
3031
return self
3132

@@ -37,7 +38,7 @@ def update(self, ips: list) -> None:
3738
"""Store all Shecan's ip addresses."""
3839
self._parser[self._name]["dns-ips"] = ",".join(ips)
3940

40-
def list_dns(self):
41+
def list_dns(self) -> list[str]:
4142
"""Return list of Shecan's dns servers."""
4243
try:
4344
ips = self._parser[self._name]["dns-ips"].split(",")

0 commit comments

Comments
 (0)