From a927f7df3a9ed60715d9d10f44d6ced1106301ad Mon Sep 17 00:00:00 2001 From: richard-rogers <93153899+richard-rogers@users.noreply.github.com> Date: Tue, 19 Sep 2023 11:57:23 -0700 Subject: [PATCH] Fix typo in whylabs session config error message (#1372) Fixes typo in whylabs session config error message Also corrects `writer::check_interval()` doctoring --- python/whylogs/api/whylabs/session/config.py | 2 +- python/whylogs/api/writer/writer.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/python/whylogs/api/whylabs/session/config.py b/python/whylogs/api/whylabs/session/config.py index 04dc1d54a0..d5c639c7a0 100644 --- a/python/whylogs/api/whylabs/session/config.py +++ b/python/whylogs/api/whylabs/session/config.py @@ -248,7 +248,7 @@ def _require(self, name: str, value: Optional[str]) -> str: if value is None: session_type = self.get_session_type() raise ValueError( - f"Can't determine {name}. Current session type if {session_type.value}. " + f"Can't determine {name}. Current session type is {session_type.value}. " f"See {_INIT_DOCS} for instructions on using why.init()." ) diff --git a/python/whylogs/api/writer/writer.py b/python/whylogs/api/writer/writer.py index e9bd6bc74c..616b7f1d4a 100644 --- a/python/whylogs/api/writer/writer.py +++ b/python/whylogs/api/writer/writer.py @@ -29,8 +29,9 @@ class Writer(ABC): def check_interval(self, interval_seconds: int) -> None: """Validate an interval configuration for a given writer. - Some writer only accepts certain interval configuration. By default, this should return True for a valid - non-negative interval.""" + Some writer only accepts certain interval configuration. Raise BadConfigError for + an unacceptable interval.""" + pass @abstractmethod def write(