File: gen_formats.py

package info (click to toggle)
zabbix-cli 3.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,860 kB
  • sloc: python: 18,557; makefile: 3
file content (22 lines) | stat: -rw-r--r-- 457 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from __future__ import annotations

import sys
from pathlib import Path

import yaml  # type: ignore
from zabbix_cli.config.constants import OutputFormat

sys.path.append(Path(__file__).parent.as_posix())

from common import DATA_DIR  # noqa


def main() -> None:
    fmts = [fmt.value for fmt in OutputFormat]

    with open(DATA_DIR / "formats.yaml", "w") as f:
        yaml.dump(fmts, f, default_flow_style=False)


if __name__ == "__main__":
    main()