From c5285608452445cbcfb80fcfbbd4364cfde5c148 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver <thomas.kluyver@xfel.eu> Date: Wed, 11 Dec 2024 16:41:40 +0100 Subject: [PATCH] More informative repr for CalCatAPIClient --- src/cal_tools/calcat_interface2.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cal_tools/calcat_interface2.py b/src/cal_tools/calcat_interface2.py index 611692e06..0f5f58f90 100644 --- a/src/cal_tools/calcat_interface2.py +++ b/src/cal_tools/calcat_interface2.py @@ -49,6 +49,10 @@ class CalCatAPIClient: # Ensure the base URL has a trailing slash self.base_api_url = base_api_url.rstrip("/") + "/" + def __repr__(self): + auth = " (with Oauth)" if self.oauth_client else "" + return f"<CalCatAPIClient for {self.base_api_url}{auth}>" + def default_headers(self): return { "content-type": "application/json", -- GitLab