From 0dd92436b24679baa53fb6c96e611e120a16a6e4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 21:47:25 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0) - [github.com/psf/black: 23.11.0 → 24.4.2](https://github.com/psf/black/compare/23.11.0...24.4.2) - [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.0.0) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a5a26a6f..6c49f788 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,19 +5,19 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-added-large-files args: [--maxkb=32000] - repo: https://github.com/psf/black - rev: 23.11.0 + rev: 24.4.2 hooks: - id: black args: ['--line-length=120'] - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 args: ['--max-line-length=120'] From 7ca34ea063daa5aa207964e6e5dfb1f29c8191e8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 21:48:03 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/source/conf.py | 1 + src/shiver/configuration.py | 1 + src/shiver/models/convert_dgs_to_single_mde.py | 7 ++++--- src/shiver/models/corrections.py | 1 + src/shiver/models/generate.py | 1 + src/shiver/models/generate_dgs_mde.py | 13 +++++++------ src/shiver/models/help.py | 1 + src/shiver/models/histogram.py | 1 + src/shiver/models/makeslice.py | 1 + src/shiver/models/makeslices.py | 1 + src/shiver/models/polarized.py | 1 + src/shiver/models/sample.py | 1 + src/shiver/presenters/generate.py | 1 + src/shiver/presenters/histogram.py | 1 + src/shiver/presenters/sample.py | 1 + src/shiver/views/advanced_options.py | 1 + src/shiver/views/corrections.py | 1 + src/shiver/views/data.py | 1 + src/shiver/views/generate.py | 1 + src/shiver/views/histogram.py | 1 + src/shiver/views/histogram_parameters.py | 1 + src/shiver/views/invalid_styles.py | 1 + src/shiver/views/loading_buttons.py | 1 + src/shiver/views/oncat.py | 1 + src/shiver/views/plots.py | 1 + src/shiver/views/polarized_options.py | 1 + src/shiver/views/reduction_parameters.py | 1 + src/shiver/views/refine_ub.py | 1 + src/shiver/views/sample.py | 1 + src/shiver/views/workspace_icons.py | 1 + src/shiver/views/workspace_tables.py | 1 + tests/conftest.py | 1 + tests/models/test_configuration.py | 1 + tests/models/test_gather_history.py | 1 + tests/models/test_generatemde.py | 1 + tests/models/test_histogram_saving.py | 1 + tests/models/test_load.py | 1 + tests/models/test_makeslice.py | 1 + tests/models/test_makeslices.py | 1 + tests/models/test_plot_display_name.py | 1 + .../test_sample_parameters_buttons_actions.py | 1 + .../models/test_sample_parameters_invalid_inputs.py | 1 + tests/models/test_show_version.py | 1 + tests/models/test_symmetry_operations.py | 1 + tests/models/test_utils.py | 1 + tests/views/test_advanced_options_inputs.py | 1 + tests/views/test_correction.py | 1 + tests/views/test_dimensions.py | 1 + tests/views/test_generate.py | 1 + tests/views/test_histogram.py | 1 + tests/views/test_loading_buttons.py | 1 + tests/views/test_mainwindow.py | 1 + tests/views/test_mde_workspaces.py | 1 + tests/views/test_mdh_workspaces.py | 1 + tests/views/test_minimize_background.py | 1 + tests/views/test_polarized_options.py | 1 + tests/views/test_projections.py | 1 + tests/views/test_reduction_parameters_inputs.py | 1 + tests/views/test_refine_ub_ui.py | 1 + tests/views/test_sample_parameters_buttons.py | 1 + tests/views/test_sample_parameters_inputs.py | 1 + 61 files changed, 70 insertions(+), 9 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index ff844ca2..6a459778 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -2,6 +2,7 @@ Purpose: A Python script holding the configuration of the project. Contains the project name and release information as well as some extra configuration keys. """ + import os import sys import versioningit diff --git a/src/shiver/configuration.py b/src/shiver/configuration.py index 7e32e092..ecab915f 100644 --- a/src/shiver/configuration.py +++ b/src/shiver/configuration.py @@ -1,6 +1,7 @@ """Module to load the the settings from SHOME/.shiver/configuration.ini file Will fall back to a default""" + import os import shutil diff --git a/src/shiver/models/convert_dgs_to_single_mde.py b/src/shiver/models/convert_dgs_to_single_mde.py index 8c873b19..ec72d03d 100644 --- a/src/shiver/models/convert_dgs_to_single_mde.py +++ b/src/shiver/models/convert_dgs_to_single_mde.py @@ -1,4 +1,5 @@ """The Shiver ConvertDGSToSingleMDE mantid algorithm""" + # pylint: disable=no-name-in-module import numpy from mantid.simpleapi import ( @@ -223,9 +224,9 @@ def validateInputs(self): if len(tib) != 2: raise ValueError("length is not 2") except ValueError: - issues[ - "TimeIndependentBackground" - ] = "This must be either 'Default' or two numbers separated by a comma" + issues["TimeIndependentBackground"] = ( + "This must be either 'Default' or two numbers separated by a comma" + ) ad_dims = self.getPropertyValue("AdditionalDimensions") if ad_dims: ad_dims = ad_dims.split(",") diff --git a/src/shiver/models/corrections.py b/src/shiver/models/corrections.py index 761a4110..bb0adb3e 100644 --- a/src/shiver/models/corrections.py +++ b/src/shiver/models/corrections.py @@ -1,4 +1,5 @@ """Model for Corrections tab""" + # pylint: disable=no-name-in-module import time from typing import Tuple diff --git a/src/shiver/models/generate.py b/src/shiver/models/generate.py index 54ec9084..170460b8 100644 --- a/src/shiver/models/generate.py +++ b/src/shiver/models/generate.py @@ -1,4 +1,5 @@ """Model for the Generate tab""" + import ast from pathlib import Path from mantid.api import ( # pylint: disable=no-name-in-module diff --git a/src/shiver/models/generate_dgs_mde.py b/src/shiver/models/generate_dgs_mde.py index 007c9141..d17fe000 100644 --- a/src/shiver/models/generate_dgs_mde.py +++ b/src/shiver/models/generate_dgs_mde.py @@ -1,4 +1,5 @@ """The Shiver GenerateDGSMDE mantid algorithm""" + # pylint: disable=no-name-in-module import json import numpy @@ -186,9 +187,9 @@ def validateInputs(self): if len(tib) != 2: raise ValueError("length is not 2") except ValueError: - issues[ - "TimeIndependentBackground" - ] = "This must be either 'Default' or two numbers separated by a comma" + issues["TimeIndependentBackground"] = ( + "This must be either 'Default' or two numbers separated by a comma" + ) ad_dims = self.getPropertyValue("AdditionalDimensions") if ad_dims: ad_dims = ad_dims.split(",") @@ -205,9 +206,9 @@ def validateInputs(self): self.getProperty("Type").value == "Background (minimized by angle and energy)" and self.getProperty("DetectorGroupingFile").value == "" ): - issues[ - "DetectorGroupingFile" - ] = "A grouping file is required when for 'Background (minimized by angle and energy)'" + issues["DetectorGroupingFile"] = ( + "A grouping file is required when for 'Background (minimized by angle and energy)'" + ) return issues diff --git a/src/shiver/models/help.py b/src/shiver/models/help.py index 44ad46d7..0076f2e0 100644 --- a/src/shiver/models/help.py +++ b/src/shiver/models/help.py @@ -1,4 +1,5 @@ """ single help module """ + import webbrowser from shiver.configuration import get_data diff --git a/src/shiver/models/histogram.py b/src/shiver/models/histogram.py index fe5d8269..6080eaa6 100644 --- a/src/shiver/models/histogram.py +++ b/src/shiver/models/histogram.py @@ -1,4 +1,5 @@ """Model for the Histogram tab""" + import time import os.path from typing import Tuple diff --git a/src/shiver/models/makeslice.py b/src/shiver/models/makeslice.py index 2ac72490..a290ec04 100644 --- a/src/shiver/models/makeslice.py +++ b/src/shiver/models/makeslice.py @@ -1,4 +1,5 @@ """The Shiver MakeSlice mantid algorithm""" + # pylint: disable=no-name-in-module from mantid.api import ( diff --git a/src/shiver/models/makeslices.py b/src/shiver/models/makeslices.py index ffc22bdd..866af711 100644 --- a/src/shiver/models/makeslices.py +++ b/src/shiver/models/makeslices.py @@ -1,4 +1,5 @@ """The Shiver MakeSFCorrectedSlices mantid algorithm""" + # pylint: disable=no-name-in-module from mantid.api import ( diff --git a/src/shiver/models/polarized.py b/src/shiver/models/polarized.py index 37f47ff6..51738008 100644 --- a/src/shiver/models/polarized.py +++ b/src/shiver/models/polarized.py @@ -1,4 +1,5 @@ """Model for the Sample Parameters dialog""" + # pylint: disable=no-name-in-module from mantid.simpleapi import mtd, AddSampleLog from mantid.kernel import Logger diff --git a/src/shiver/models/sample.py b/src/shiver/models/sample.py index 2fb80def..b58cf169 100644 --- a/src/shiver/models/sample.py +++ b/src/shiver/models/sample.py @@ -1,4 +1,5 @@ """Model for the Sample Parameters dialog""" + import numpy # pylint: disable=no-name-in-module diff --git a/src/shiver/presenters/generate.py b/src/shiver/presenters/generate.py index d3285657..7b9eeb7f 100644 --- a/src/shiver/presenters/generate.py +++ b/src/shiver/presenters/generate.py @@ -1,4 +1,5 @@ """Presenter for the Generate tab""" + import json CONFIG_TEMPLATE = """#!/usr/bin/env python diff --git a/src/shiver/presenters/histogram.py b/src/shiver/presenters/histogram.py index 68ef28ff..ae2aacd6 100644 --- a/src/shiver/presenters/histogram.py +++ b/src/shiver/presenters/histogram.py @@ -1,4 +1,5 @@ """Presenter for the Histogram tab""" + import os from qtpy.QtWidgets import QWidget from shiver.views.corrections import Corrections diff --git a/src/shiver/presenters/sample.py b/src/shiver/presenters/sample.py index a622a126..2c5b2650 100644 --- a/src/shiver/presenters/sample.py +++ b/src/shiver/presenters/sample.py @@ -1,4 +1,5 @@ """Presenter for the Sample Parameters dialog""" + from copy import deepcopy diff --git a/src/shiver/views/advanced_options.py b/src/shiver/views/advanced_options.py index 790bd02c..e516e5ca 100644 --- a/src/shiver/views/advanced_options.py +++ b/src/shiver/views/advanced_options.py @@ -1,4 +1,5 @@ """PyQt QDialog for Sample Parameters""" + import re from qtpy import QtGui diff --git a/src/shiver/views/corrections.py b/src/shiver/views/corrections.py index c3e5b679..7a7c93ab 100644 --- a/src/shiver/views/corrections.py +++ b/src/shiver/views/corrections.py @@ -1,4 +1,5 @@ """PyQt widget for the correction tab""" + # pylint: disable=no-name-in-module from qtpy.QtWidgets import ( QWidget, diff --git a/src/shiver/views/data.py b/src/shiver/views/data.py index e5f8b10d..46ee2d55 100644 --- a/src/shiver/views/data.py +++ b/src/shiver/views/data.py @@ -1,4 +1,5 @@ """PyQt widget for the raw data selection""" + import os import glob diff --git a/src/shiver/views/generate.py b/src/shiver/views/generate.py index b4c55c5a..2765681e 100644 --- a/src/shiver/views/generate.py +++ b/src/shiver/views/generate.py @@ -1,4 +1,5 @@ """PyQt widget for the histogram tab""" + import re import os import itertools diff --git a/src/shiver/views/histogram.py b/src/shiver/views/histogram.py index ed56299e..dda4f98f 100644 --- a/src/shiver/views/histogram.py +++ b/src/shiver/views/histogram.py @@ -1,4 +1,5 @@ """PyQt widget for the histogram tab""" + from qtpy.QtWidgets import QWidget, QHBoxLayout, QErrorMessage, QMessageBox from qtpy.QtCore import Signal diff --git a/src/shiver/views/histogram_parameters.py b/src/shiver/views/histogram_parameters.py index 3daf00c1..54989d42 100644 --- a/src/shiver/views/histogram_parameters.py +++ b/src/shiver/views/histogram_parameters.py @@ -1,4 +1,5 @@ """PyQt QGroupBox for the histogram parameters""" + import numpy from qtpy import QtGui from qtpy.QtWidgets import ( diff --git a/src/shiver/views/invalid_styles.py b/src/shiver/views/invalid_styles.py index 38a634f1..08683314 100644 --- a/src/shiver/views/invalid_styles.py +++ b/src/shiver/views/invalid_styles.py @@ -1,4 +1,5 @@ """CSS styles invalid fields""" + INVALID_QLINEEDIT = """ QLineEdit { border-color: red; diff --git a/src/shiver/views/loading_buttons.py b/src/shiver/views/loading_buttons.py index 0f4cdd35..1c8a0999 100644 --- a/src/shiver/views/loading_buttons.py +++ b/src/shiver/views/loading_buttons.py @@ -1,4 +1,5 @@ """PyQt widget for the histogram tab""" + import importlib import os from qtpy.QtWidgets import ( diff --git a/src/shiver/views/oncat.py b/src/shiver/views/oncat.py index ad04ed19..21bd7aed 100644 --- a/src/shiver/views/oncat.py +++ b/src/shiver/views/oncat.py @@ -1,4 +1,5 @@ """PyQt widget for the OnCat widget in General tab.""" + import os import json import oauthlib diff --git a/src/shiver/views/plots.py b/src/shiver/views/plots.py index e5188d71..377252b5 100644 --- a/src/shiver/views/plots.py +++ b/src/shiver/views/plots.py @@ -1,4 +1,5 @@ """Functions to plot histograms""" + import matplotlib.pyplot as plt from mantidqt.widgets.sliceviewer.presenters.presenter import SliceViewer from mantidqt.plotting.functions import manage_workspace_names, plot_md_ws_from_names diff --git a/src/shiver/views/polarized_options.py b/src/shiver/views/polarized_options.py index 14d338e2..f02c1dad 100644 --- a/src/shiver/views/polarized_options.py +++ b/src/shiver/views/polarized_options.py @@ -1,4 +1,5 @@ """PyQt QDialog for Sample Parameters""" + from qtpy import QtGui from qtpy.QtWidgets import ( QWidget, diff --git a/src/shiver/views/reduction_parameters.py b/src/shiver/views/reduction_parameters.py index 9cee25dd..1def96fa 100644 --- a/src/shiver/views/reduction_parameters.py +++ b/src/shiver/views/reduction_parameters.py @@ -1,4 +1,5 @@ """PyQt widget for the Reduction Parameters section""" + from qtpy import QtGui from qtpy.QtWidgets import ( QWidget, diff --git a/src/shiver/views/refine_ub.py b/src/shiver/views/refine_ub.py index ff6fb99c..e9f0c6a5 100644 --- a/src/shiver/views/refine_ub.py +++ b/src/shiver/views/refine_ub.py @@ -1,4 +1,5 @@ """View for the Refine UB widget""" + import types from qtpy.QtWidgets import ( QWidget, diff --git a/src/shiver/views/sample.py b/src/shiver/views/sample.py index 161e4422..efa2e16b 100644 --- a/src/shiver/views/sample.py +++ b/src/shiver/views/sample.py @@ -1,4 +1,5 @@ """PyQt QDialog for Sample Parameters""" + from qtpy import QtGui from qtpy.QtWidgets import ( QWidget, diff --git a/src/shiver/views/workspace_icons.py b/src/shiver/views/workspace_icons.py index fd0392c6..dda130bf 100644 --- a/src/shiver/views/workspace_icons.py +++ b/src/shiver/views/workspace_icons.py @@ -1,4 +1,5 @@ """PyQt widget for the workspace icons""" + from qtpy.QtWidgets import QLabel, QWidget, QFormLayout from qtpy.QtCore import QSize from qtpy.QtGui import QIcon, QPixmap diff --git a/src/shiver/views/workspace_tables.py b/src/shiver/views/workspace_tables.py index 9b57f7ff..fac7f4f0 100644 --- a/src/shiver/views/workspace_tables.py +++ b/src/shiver/views/workspace_tables.py @@ -1,4 +1,5 @@ """PyQt widget for the histogram tab input workspaces""" + from functools import partial from enum import Enum from qtpy.QtWidgets import ( diff --git a/tests/conftest.py b/tests/conftest.py index 466adb3f..1f111cac 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ """pytest config""" + import os from configparser import ConfigParser diff --git a/tests/models/test_configuration.py b/tests/models/test_configuration.py index cf57e8e4..bed43ac9 100644 --- a/tests/models/test_configuration.py +++ b/tests/models/test_configuration.py @@ -1,4 +1,5 @@ """Tests for Configuration mechanism""" + import os from configparser import ConfigParser from pathlib import Path diff --git a/tests/models/test_gather_history.py b/tests/models/test_gather_history.py index 6bb0cb37..2876b604 100644 --- a/tests/models/test_gather_history.py +++ b/tests/models/test_gather_history.py @@ -1,4 +1,5 @@ """Test for histogram model.""" + import os import pytest diff --git a/tests/models/test_generatemde.py b/tests/models/test_generatemde.py index e8a21bff..818a7bd1 100644 --- a/tests/models/test_generatemde.py +++ b/tests/models/test_generatemde.py @@ -1,4 +1,5 @@ """Tests for the ConvertDGSToSingleMDE algorithm""" + import os from pytest import approx, raises from mantid.simpleapi import ( # pylint: disable=no-name-in-module diff --git a/tests/models/test_histogram_saving.py b/tests/models/test_histogram_saving.py index 92bf9998..aa66a403 100644 --- a/tests/models/test_histogram_saving.py +++ b/tests/models/test_histogram_saving.py @@ -1,4 +1,5 @@ """Test the histogram workspace saving""" + # pylint: disable=too-many-lines import os import ast diff --git a/tests/models/test_load.py b/tests/models/test_load.py index 8e6d9f92..50fd68cf 100644 --- a/tests/models/test_load.py +++ b/tests/models/test_load.py @@ -1,4 +1,5 @@ """Tests for the file loading part of the HistogramModel""" + import time import os from mantid.simpleapi import ( # pylint: disable=no-name-in-module diff --git a/tests/models/test_makeslice.py b/tests/models/test_makeslice.py index 561b8682..77f800a7 100644 --- a/tests/models/test_makeslice.py +++ b/tests/models/test_makeslice.py @@ -1,4 +1,5 @@ """Tests for the MakeSlice algorithm""" + import os from pytest import approx import numpy as np diff --git a/tests/models/test_makeslices.py b/tests/models/test_makeslices.py index a31f1dad..4e6c69a1 100644 --- a/tests/models/test_makeslices.py +++ b/tests/models/test_makeslices.py @@ -1,4 +1,5 @@ """Tests for the MakeSlice algorithm""" + import os from pytest import raises, approx import numpy as np diff --git a/tests/models/test_plot_display_name.py b/tests/models/test_plot_display_name.py index 3ca4e656..6b9d424e 100644 --- a/tests/models/test_plot_display_name.py +++ b/tests/models/test_plot_display_name.py @@ -1,4 +1,5 @@ """Tests for the plot title creation part of the HistogramModel""" + # pylint: disable=no-name-in-module from mantid.simpleapi import ( mtd, diff --git a/tests/models/test_sample_parameters_buttons_actions.py b/tests/models/test_sample_parameters_buttons_actions.py index d4016ca9..ebfdde84 100644 --- a/tests/models/test_sample_parameters_buttons_actions.py +++ b/tests/models/test_sample_parameters_buttons_actions.py @@ -1,4 +1,5 @@ """tests for Sample Parameters dialog: button actions""" + import os # pylint: disable=no-name-in-module diff --git a/tests/models/test_sample_parameters_invalid_inputs.py b/tests/models/test_sample_parameters_invalid_inputs.py index ccd843fc..6beaf583 100644 --- a/tests/models/test_sample_parameters_invalid_inputs.py +++ b/tests/models/test_sample_parameters_invalid_inputs.py @@ -1,4 +1,5 @@ """tests for Sample Parameters dialog: inputs""" + import os # pylint: disable=no-name-in-module diff --git a/tests/models/test_show_version.py b/tests/models/test_show_version.py index 681a1f1e..5bbae9b7 100644 --- a/tests/models/test_show_version.py +++ b/tests/models/test_show_version.py @@ -1,4 +1,5 @@ """Tests for printing the version""" + import sys from pytest import raises from shiver.shiver import gui diff --git a/tests/models/test_symmetry_operations.py b/tests/models/test_symmetry_operations.py index 4521951f..d2de7885 100644 --- a/tests/models/test_symmetry_operations.py +++ b/tests/models/test_symmetry_operations.py @@ -1,4 +1,5 @@ """Tests for the file loading part of the HistogramModel""" + from shiver.models.histogram import HistogramModel diff --git a/tests/models/test_utils.py b/tests/models/test_utils.py index 7bbc4a48..a65009ec 100644 --- a/tests/models/test_utils.py +++ b/tests/models/test_utils.py @@ -1,4 +1,5 @@ """Tests for shiver.models.utils""" + from shiver.models.utils import flatten_list diff --git a/tests/views/test_advanced_options_inputs.py b/tests/views/test_advanced_options_inputs.py index 4a79bda7..98f7ecf8 100644 --- a/tests/views/test_advanced_options_inputs.py +++ b/tests/views/test_advanced_options_inputs.py @@ -1,4 +1,5 @@ """UI tests for Reduction Parameters widget: input values""" + import re from functools import partial from qtpy import QtCore diff --git a/tests/views/test_correction.py b/tests/views/test_correction.py index 14c48bb1..df24fb9d 100644 --- a/tests/views/test_correction.py +++ b/tests/views/test_correction.py @@ -1,4 +1,5 @@ """UI tests for the corrections table""" + # pylint: disable=no-name-in-module import os import re diff --git a/tests/views/test_dimensions.py b/tests/views/test_dimensions.py index ca7f6b61..0e6d76f4 100644 --- a/tests/views/test_dimensions.py +++ b/tests/views/test_dimensions.py @@ -1,4 +1,5 @@ """UI tests for HistogramParameter button""" + import re from qtpy import QtCore diff --git a/tests/views/test_generate.py b/tests/views/test_generate.py index 25b6e950..b13f87ce 100644 --- a/tests/views/test_generate.py +++ b/tests/views/test_generate.py @@ -1,4 +1,5 @@ """Test the generate view.""" + import re import os from qtpy import QtCore diff --git a/tests/views/test_histogram.py b/tests/views/test_histogram.py index 26585339..6561be8a 100644 --- a/tests/views/test_histogram.py +++ b/tests/views/test_histogram.py @@ -1,4 +1,5 @@ """UI test for the histogram tab""" + import os from functools import partial import pytest diff --git a/tests/views/test_loading_buttons.py b/tests/views/test_loading_buttons.py index 82bf5757..1c6c6f9d 100644 --- a/tests/views/test_loading_buttons.py +++ b/tests/views/test_loading_buttons.py @@ -1,4 +1,5 @@ """UI tests for LoadingButtons widget""" + import functools from qtpy import QtCore, QtWidgets from shiver.views.loading_buttons import LoadingButtons diff --git a/tests/views/test_mainwindow.py b/tests/views/test_mainwindow.py index f3bb7f9f..f8e586b9 100644 --- a/tests/views/test_mainwindow.py +++ b/tests/views/test_mainwindow.py @@ -1,4 +1,5 @@ """UI tests for the application""" + from shiver import Shiver, __version__ diff --git a/tests/views/test_mde_workspaces.py b/tests/views/test_mde_workspaces.py index c41ef995..35f93f99 100644 --- a/tests/views/test_mde_workspaces.py +++ b/tests/views/test_mde_workspaces.py @@ -1,4 +1,5 @@ """UI tests for the MDE list tables""" + import os from functools import partial from qtpy.QtWidgets import QMenu, QInputDialog, QFileDialog, QLineEdit diff --git a/tests/views/test_mdh_workspaces.py b/tests/views/test_mdh_workspaces.py index 8c991d2e..fb88f99c 100644 --- a/tests/views/test_mdh_workspaces.py +++ b/tests/views/test_mdh_workspaces.py @@ -1,4 +1,5 @@ """UI tests for the MDH list tables""" + from functools import partial import pytest from qtpy.QtWidgets import QApplication, QMenu, QFileDialog, QLineEdit diff --git a/tests/views/test_minimize_background.py b/tests/views/test_minimize_background.py index 152815dd..1586beda 100644 --- a/tests/views/test_minimize_background.py +++ b/tests/views/test_minimize_background.py @@ -1,4 +1,5 @@ """Test for the BackgroundMinimization widget""" + import os import re from qtpy import QtCore, QtWidgets diff --git a/tests/views/test_polarized_options.py b/tests/views/test_polarized_options.py index c8d3d80a..11c5d180 100644 --- a/tests/views/test_polarized_options.py +++ b/tests/views/test_polarized_options.py @@ -1,4 +1,5 @@ """UI tests for Reduction Parameters widget: input values""" + from functools import partial from qtpy import QtCore diff --git a/tests/views/test_projections.py b/tests/views/test_projections.py index 8f2aeada..aa698e4a 100644 --- a/tests/views/test_projections.py +++ b/tests/views/test_projections.py @@ -1,4 +1,5 @@ """UI tests for HistogramParameter button""" + import re from shiver.views.histogram import HistogramParameter diff --git a/tests/views/test_reduction_parameters_inputs.py b/tests/views/test_reduction_parameters_inputs.py index a794fbe8..68b79832 100644 --- a/tests/views/test_reduction_parameters_inputs.py +++ b/tests/views/test_reduction_parameters_inputs.py @@ -1,4 +1,5 @@ """UI tests for Reduction Parameters widget: input values""" + import os import re from functools import partial diff --git a/tests/views/test_refine_ub_ui.py b/tests/views/test_refine_ub_ui.py index 0d09ffca..9220ed60 100644 --- a/tests/views/test_refine_ub_ui.py +++ b/tests/views/test_refine_ub_ui.py @@ -1,4 +1,5 @@ """UI test for Refine UB widget""" + import pytest from qtpy import QtCore from mantid.simpleapi import ( # pylint: disable=no-name-in-module diff --git a/tests/views/test_sample_parameters_buttons.py b/tests/views/test_sample_parameters_buttons.py index e2313dc0..a6614198 100644 --- a/tests/views/test_sample_parameters_buttons.py +++ b/tests/views/test_sample_parameters_buttons.py @@ -1,4 +1,5 @@ """UI tests for Sample Parameters dialog: buttons""" + import os import re import functools diff --git a/tests/views/test_sample_parameters_inputs.py b/tests/views/test_sample_parameters_inputs.py index 3bae00f6..6ee6fa56 100644 --- a/tests/views/test_sample_parameters_inputs.py +++ b/tests/views/test_sample_parameters_inputs.py @@ -1,4 +1,5 @@ """UI tests for Sample Parameters dialog: input values""" + import os import re from functools import partial