From 8c2e7c82592ace50e4e1f47e392a0ddc988f57ae Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Thu, 22 Aug 2024 20:44:28 +0200 Subject: [PATCH] fix: minor fixes for type annotations --- bec_widgets/utils/container_utils.py | 2 ++ bec_widgets/widgets/bec_queue/bec_queue.py | 2 ++ docs/conf.py | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bec_widgets/utils/container_utils.py b/bec_widgets/utils/container_utils.py index 02bac4dd..9b4875d5 100644 --- a/bec_widgets/utils/container_utils.py +++ b/bec_widgets/utils/container_utils.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import itertools from typing import Type diff --git a/bec_widgets/widgets/bec_queue/bec_queue.py b/bec_widgets/widgets/bec_queue/bec_queue.py index 04dfd7d7..a9575ce6 100644 --- a/bec_widgets/widgets/bec_queue/bec_queue.py +++ b/bec_widgets/widgets/bec_queue/bec_queue.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from bec_lib.endpoints import MessageEndpoints from qtpy.QtCore import Qt, Slot from qtpy.QtWidgets import QHBoxLayout, QHeaderView, QTableWidget, QTableWidgetItem, QWidget diff --git a/docs/conf.py b/docs/conf.py index 7401ae3e..7cb22231 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -65,7 +65,7 @@ add_module_names = False # Remove namespaces from class/method signatures autodoc_inherit_docstrings = True # If no docstring, inherit from base class set_type_checking_flag = True # Enable 'expensive' imports for sphinx_autodoc_typehints autoclass_content = "both" # Include both class docstring and __init__ -autodoc_mock_imports = ["pyqtgraph"] +autodoc_mock_imports = ["pyqtgraph", "qtpy", "PySide6"] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"]