"""Simplified hosts for pysyte"""

import getpass
import socket
from dataclasses import dataclass
from typing import List


@dataclass
class Host:
    hostname: str
    aliases: List[str]
    addresses: List[str]
    users: List[str]


def _read_localhost() -> Host:
    """Read host values for localhost"""
    host, aliases, addresses = socket.gethostbyname_ex(socket.gethostname())
    user = getpass.getuser()
    return Host(host, aliases, addresses, [user])

localhost = _read_localhost()

"""Simplified hosts for pysyte"""

import getpass
import socket
from dataclasses import dataclass


@dataclass
class Host:
    hostname: str
    aliases: list
    addresses: list
    users: list


localhost = Host(
    *(list(socket.gethostbyname_ex(socket.gethostname())) + [getpass.getuser()])
)

--- 
+++ 
@@ -3,16 +3,21 @@
 import getpass
 import socket
 from dataclasses import dataclass
+from typing import List
 
 
 @dataclass
 class Host:
     hostname: str
-    aliases: list
-    addresses: list
-    users: list
+    aliases: List[str]
+    addresses: List[str]
+    users: List[str]
 
 
-localhost = Host(
-    *(list(socket.gethostbyname_ex(socket.gethostname())) + [getpass.getuser()])
-)
+def _read_localhost() -> Host:
+    """Read host values for localhost"""
+    host, aliases, addresses = socket.gethostbyname_ex(socket.gethostname())
+    user = getpass.getuser()
+    return Host(host, aliases, addresses, [user])
+
+localhost = _read_localhost()
Add method to clarify localhost data
