dbus-fast/tests/util.py
J. Nick Koston eda37061c4
chore: switch to ruff (#339)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-07 09:37:35 -10:00

17 lines
346 B
Python

_has_gi = None
skip_reason_no_gi = "glib tests require python3-gi"
def check_gi_repository():
global _has_gi
if _has_gi is not None:
return _has_gi
try:
from gi.repository import GLib # noqa: F401
_has_gi = True
return _has_gi
except ImportError:
_has_gi = False
return _has_gi