From 1814adba40d1daaf2dd0bac481fc6f095575c8ff Mon Sep 17 00:00:00 2001 From: Tobias Ahrens Date: Fri, 20 Sep 2024 11:15:21 +0200 Subject: [PATCH] Fix docstrings This commit fixes docstrings which contain outdated information --- src/labone/core/errors.py | 2 +- src/labone/core/kernel_session.py | 2 +- src/labone/core/value.py | 2 -- src/labone/mock/automatic_server.py | 6 +++++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/labone/core/errors.py b/src/labone/core/errors.py index 7a53489..b182e2a 100644 --- a/src/labone/core/errors.py +++ b/src/labone/core/errors.py @@ -163,7 +163,7 @@ def raise_streaming_error(err: hpk_schema.Error) -> None: err: The streaming error to be converted. Raises: - The converted error. + LabOneCoreError: The converted error. """ raise _ZI_ERROR_MAP.get(err.kind, LabOneCoreError)( # type: ignore[call-overload] err.message, diff --git a/src/labone/core/kernel_session.py b/src/labone/core/kernel_session.py index c25b35a..c6ffbd1 100644 --- a/src/labone/core/kernel_session.py +++ b/src/labone/core/kernel_session.py @@ -74,8 +74,8 @@ class KernelSession(Session): Args: core_session: The underlying zhinst.comms session. context: The context in which the session is running. - kernel_info: Information about the target kernel. server_info: Information about the target data server. + capability_version: The capability version the server reported. """ def __init__( diff --git a/src/labone/core/value.py b/src/labone/core/value.py index 2c494a4..53145f2 100644 --- a/src/labone/core/value.py +++ b/src/labone/core/value.py @@ -56,8 +56,6 @@ class AnnotatedValue: path: Absolute node path. timestamp: Timestamp at which the device sent the value. (Only relevant for received values.) - extra_header: For some types of vector nodes, additional information - regarding the data. None otherwise. """ value: Value diff --git a/src/labone/mock/automatic_server.py b/src/labone/mock/automatic_server.py index d327dca..bfdf9e1 100644 --- a/src/labone/mock/automatic_server.py +++ b/src/labone/mock/automatic_server.py @@ -236,7 +236,11 @@ async def set( path: LabOneNodePath, ) -> AnnotatedValue: ... - async def set(self, value: AnnotatedValue | Value, path="") -> AnnotatedValue: + async def set( + self, + value: AnnotatedValue | Value, + path: str = "", + ) -> AnnotatedValue: """Predefined behaviour for set. Updates the internal dictionary. A set command is considered