diff --git a/caliban/resources/caliban_launcher.py b/caliban/resources/caliban_launcher.py index f33ebae..2381521 100644 --- a/caliban/resources/caliban_launcher.py +++ b/caliban/resources/caliban_launcher.py @@ -20,7 +20,7 @@ import argparse import copy -import google.auth +from importlib.util import find_spec import json import logging import os @@ -153,7 +153,13 @@ def _ensure_non_null_project(env): project_id = None try: - _, project_id = google.auth.default() + if find_spec("google.auth") is not None: + import google.auth + + _, project_id = google.auth.default() + else: + project_id = None + except Exception: project_id = None diff --git a/setup.cfg b/setup.cfg index 72bc497..8acb83c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,6 +5,11 @@ addopts = --doctest-modules -v -s [pycodestyle] ignore = E111,E114 +[yapf] +based_on_style = google +indent_width = 2 +split_before_first_argument = false + # pytest coverage options [run] omit =