From 97c360195550d06d9d528f8aa1a9f1022fc91ece Mon Sep 17 00:00:00 2001 From: Herman Schaaf Date: Wed, 2 Aug 2023 16:03:03 +0100 Subject: [PATCH 1/2] Fix generate docs command --- cloudquery/sdk/serve/plugin.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/cloudquery/sdk/serve/plugin.py b/cloudquery/sdk/serve/plugin.py index 74082f7..15d6a66 100644 --- a/cloudquery/sdk/serve/plugin.py +++ b/cloudquery/sdk/serve/plugin.py @@ -59,15 +59,15 @@ def get_logger(args): processors.append( structlog.dev.ConsoleRenderer( colors=os.environ.get("NO_COLOR", "") == "" - and ( - os.environ.get("FORCE_COLOR", "") != "" - or ( - _has_colors - and sys.stdout is not None - and hasattr(sys.stdout, "isatty") - and sys.stdout.isatty() - ) - ) + and ( + os.environ.get("FORCE_COLOR", "") != "" + or ( + _has_colors + and sys.stdout is not None + and hasattr(sys.stdout, "isatty") + and sys.stdout.isatty() + ) + ) ) ) else: @@ -187,8 +187,6 @@ def stop(self): self._server.stop(5) def _generate_docs(self, args): - logger = get_logger(args) - logger.info("Generating docs", format=args.format) generator = Generator( self._plugin.name(), self._plugin.get_tables( From a46d6c17863c2f5220bf56acc870bb462c86262b Mon Sep 17 00:00:00 2001 From: Herman Schaaf Date: Wed, 2 Aug 2023 16:03:42 +0100 Subject: [PATCH 2/2] Fix formatting --- cloudquery/sdk/serve/plugin.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cloudquery/sdk/serve/plugin.py b/cloudquery/sdk/serve/plugin.py index 15d6a66..f298c9a 100644 --- a/cloudquery/sdk/serve/plugin.py +++ b/cloudquery/sdk/serve/plugin.py @@ -59,15 +59,15 @@ def get_logger(args): processors.append( structlog.dev.ConsoleRenderer( colors=os.environ.get("NO_COLOR", "") == "" - and ( - os.environ.get("FORCE_COLOR", "") != "" - or ( - _has_colors - and sys.stdout is not None - and hasattr(sys.stdout, "isatty") - and sys.stdout.isatty() - ) - ) + and ( + os.environ.get("FORCE_COLOR", "") != "" + or ( + _has_colors + and sys.stdout is not None + and hasattr(sys.stdout, "isatty") + and sys.stdout.isatty() + ) + ) ) ) else: