From 52ded44638b39a3dd5df86006f8f96b35408c21f Mon Sep 17 00:00:00 2001 From: danielhrisca Date: Mon, 11 Nov 2024 14:10:51 +0200 Subject: [PATCH] HDF5 was shown two times --- src/asammdf/gui/widgets/batch.py | 7 ------- src/asammdf/gui/widgets/file.py | 7 ------- test/asammdf/gui/test_base.py | 2 +- .../gui/widgets/plot/test_PlotWidget_PushButtons.py | 8 +++----- test/asammdf/gui/widgets/test_BaseFileWidget.py | 2 +- test/asammdf/gui/widgets/test_BasePlotWidget.py | 2 -- 6 files changed, 5 insertions(+), 23 deletions(-) diff --git a/src/asammdf/gui/widgets/batch.py b/src/asammdf/gui/widgets/batch.py index 8e9df0697..0e64600fa 100644 --- a/src/asammdf/gui/widgets/batch.py +++ b/src/asammdf/gui/widgets/batch.py @@ -92,13 +92,6 @@ def __init__( formats = ["MDF", "ASC", "CSV"] - try: - from h5py import File as HDF5 - - formats.append("HDF5") - except ImportError: - pass - try: from hdf5storage import savemat diff --git a/src/asammdf/gui/widgets/file.py b/src/asammdf/gui/widgets/file.py index b53d49b9f..d5e6d481b 100644 --- a/src/asammdf/gui/widgets/file.py +++ b/src/asammdf/gui/widgets/file.py @@ -355,13 +355,6 @@ def __init__( formats = ["MDF", "ASC", "CSV"] - try: - from h5py import File as HDF5 - - formats.append("HDF5") - except ImportError: - pass - try: from hdf5storage import savemat diff --git a/test/asammdf/gui/test_base.py b/test/asammdf/gui/test_base.py index 7d3de28d1..aa99b3793 100644 --- a/test/asammdf/gui/test_base.py +++ b/test/asammdf/gui/test_base.py @@ -22,8 +22,8 @@ class DragAndDrop import pyqtgraph from PySide6 import QtCore, QtGui, QtTest, QtWidgets -from asammdf import mdf +from asammdf import mdf from asammdf.gui.utils import excepthook if sys.platform == "win32": diff --git a/test/asammdf/gui/widgets/plot/test_PlotWidget_PushButtons.py b/test/asammdf/gui/widgets/plot/test_PlotWidget_PushButtons.py index 1a7a09e8b..c191319b8 100644 --- a/test/asammdf/gui/widgets/plot/test_PlotWidget_PushButtons.py +++ b/test/asammdf/gui/widgets/plot/test_PlotWidget_PushButtons.py @@ -1,12 +1,10 @@ #!/usr/bin/env python -import shutil -from unittest import mock from PySide6 import QtCore, QtTest -from PySide6.QtCore import Qt -from PySide6.QtWidgets import QPushButton as QBtn, QTreeWidgetItemIterator, QMessageBox +from PySide6.QtWidgets import QPushButton as QBtn +from PySide6.QtWidgets import QTreeWidgetItemIterator -from asammdf.gui.utils import COLORS, BLUE +from asammdf.gui.utils import BLUE, COLORS from test.asammdf.gui.test_base import Pixmap from test.asammdf.gui.widgets.test_BasePlotWidget import TestPlotWidget diff --git a/test/asammdf/gui/widgets/test_BaseFileWidget.py b/test/asammdf/gui/widgets/test_BaseFileWidget.py index 88678a558..b88ba5b72 100644 --- a/test/asammdf/gui/widgets/test_BaseFileWidget.py +++ b/test/asammdf/gui/widgets/test_BaseFileWidget.py @@ -1,8 +1,8 @@ import json import os import pathlib -import shutil from random import randint +import shutil from unittest import mock from PySide6 import QtCore, QtTest, QtWidgets diff --git a/test/asammdf/gui/widgets/test_BasePlotWidget.py b/test/asammdf/gui/widgets/test_BasePlotWidget.py index c183cf389..89b7ea80a 100644 --- a/test/asammdf/gui/widgets/test_BasePlotWidget.py +++ b/test/asammdf/gui/widgets/test_BasePlotWidget.py @@ -1,5 +1,3 @@ -import pathlib -import shutil import threading as td from unittest import mock