File: __init__.py

package info (click to toggle)
zabbix-cli 3.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,892 kB
  • sloc: python: 18,211; makefile: 3
file content (13 lines) | stat: -rw-r--r-- 391 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
from __future__ import annotations

import importlib
from pathlib import Path


def bootstrap_commands() -> None:
    """Bootstrap all command defined in the command modules."""
    module_dir = Path(__file__).parent
    for module in module_dir.glob("*.py"):
        if module.stem == "__init__":
            continue
        importlib.import_module(f".{module.stem}", package=__package__)