"""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()])
)

"""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()

Add method to clarify localhost data
Add method to clarify localhost data

  """Simplified hosts for pysyte"""
  
  import getpass
  import socket
  from dataclasses import dataclass
+ from typing import List
  
  
  @dataclass
  class Host:
      hostname: str
-     aliases: list
+     aliases: List[str]
-     addresses: list
+     addresses: List[str]
-     users: list
+     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
## Code Before:
"""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()])
)

## Instruction:
Add method to clarify localhost data
## Code After:
"""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()
