Skip to content

Commit

Permalink
Fix missing parameter type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
pederhan committed Jul 24, 2024
1 parent b7df58a commit adabe2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zabbix_auto_config/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,11 @@ class HostsSerializer(RootModel[List[Host]]):
root: List[Host]


def hosts_to_json(hosts: List[Host], indent=2) -> str:
def hosts_to_json(hosts: List[Host], indent: int = 2) -> str:
"""Convert a list of Host objects to a JSON string."""
return HostsSerializer(root=hosts).model_dump_json(indent=indent)


def print_hosts(hosts: List[Host], indent=2) -> None:
def print_hosts(hosts: List[Host], indent: int = 2) -> None:
"""Print a list of Host objects to stdout as JSON."""
print(hosts_to_json(hosts, indent=indent))

0 comments on commit adabe2a

Please sign in to comment.