From 7b1c713beda67ed1cc58a7181f5d83a883847e7c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Feb 2024 23:27:57 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- RefRed/calculations/check_list_run_compatibility_thread.py | 1 + RefRed/decorators.py | 1 + RefRed/gui_handling/data_norm_spinboxes.py | 1 + RefRed/gui_handling/observer.py | 2 ++ RefRed/reduction/individual_reduction_settings_handler.py | 1 + RefRed/sf_calculator/lr_data.py | 1 + RefRed/sf_calculator/sf_calculator.py | 1 + RefRed/status_message_handler.py | 1 + RefRed/tabledata.py | 1 + 9 files changed, 10 insertions(+) diff --git a/RefRed/calculations/check_list_run_compatibility_thread.py b/RefRed/calculations/check_list_run_compatibility_thread.py index f3920090..d74f055f 100644 --- a/RefRed/calculations/check_list_run_compatibility_thread.py +++ b/RefRed/calculations/check_list_run_compatibility_thread.py @@ -7,6 +7,7 @@ 1: Direct beam data 2: Reduction options """ + # import logging import RefRed.colors from qtpy import QtCore, QtGui diff --git a/RefRed/decorators.py b/RefRed/decorators.py index 3d23ee9e..eb72529c 100644 --- a/RefRed/decorators.py +++ b/RefRed/decorators.py @@ -1,6 +1,7 @@ ''' Module for useful decorators ''' + from qtpy import QtGui, QtCore, QtWidgets from RefRed import WINDOW_TITLE from functools import wraps diff --git a/RefRed/gui_handling/data_norm_spinboxes.py b/RefRed/gui_handling/data_norm_spinboxes.py index 83eac35f..9ca7bc98 100644 --- a/RefRed/gui_handling/data_norm_spinboxes.py +++ b/RefRed/gui_handling/data_norm_spinboxes.py @@ -109,6 +109,7 @@ def __init__(self, parent=None): class DataBackSpinbox(object): r"""TODO: document this class""" + parent = None def __init__(self, parent=None): diff --git a/RefRed/gui_handling/observer.py b/RefRed/gui_handling/observer.py index b1b1f2a0..e9106b81 100644 --- a/RefRed/gui_handling/observer.py +++ b/RefRed/gui_handling/observer.py @@ -17,12 +17,14 @@ class SpinBoxObserver: QUANTUM : int The minimum allowed change in value for any of the registered QSpinBox objects """ + NAN: int = -1 QUANTUM: int = 1 @dataclass class RegistryEntry: r"""Helper class to encapsulate entries in the registry of SpinBoxObserver._registry""" + spin_box: QSpinBox last_value: int diff --git a/RefRed/reduction/individual_reduction_settings_handler.py b/RefRed/reduction/individual_reduction_settings_handler.py index ab98b603..fa78d17b 100644 --- a/RefRed/reduction/individual_reduction_settings_handler.py +++ b/RefRed/reduction/individual_reduction_settings_handler.py @@ -6,6 +6,7 @@ is saved if it's not used here. It creates confusion as to where we should keep this information. """ + from RefRed.tabledata import TableData diff --git a/RefRed/sf_calculator/lr_data.py b/RefRed/sf_calculator/lr_data.py index 3bc3bace..e558525d 100644 --- a/RefRed/sf_calculator/lr_data.py +++ b/RefRed/sf_calculator/lr_data.py @@ -2,6 +2,7 @@ Notes from review: This class does a subset of what is done in calculations.lr_data. This code is probably not needed. """ + from mantid.simpleapi import Rebin import numpy as np import logging diff --git a/RefRed/sf_calculator/sf_calculator.py b/RefRed/sf_calculator/sf_calculator.py index ccc7c534..2a1c9c73 100644 --- a/RefRed/sf_calculator/sf_calculator.py +++ b/RefRed/sf_calculator/sf_calculator.py @@ -2,6 +2,7 @@ Scaling factor calculator TODO: This need major cleanup """ + import sys import os from pathlib import Path diff --git a/RefRed/status_message_handler.py b/RefRed/status_message_handler.py index f643bbf9..05f86a03 100644 --- a/RefRed/status_message_handler.py +++ b/RefRed/status_message_handler.py @@ -1,6 +1,7 @@ """ TODO: refactor this """ + import sys import time from qtpy import QtCore diff --git a/RefRed/tabledata.py b/RefRed/tabledata.py index 8423a368..c9d9f58b 100644 --- a/RefRed/tabledata.py +++ b/RefRed/tabledata.py @@ -12,6 +12,7 @@ class TableDataColumIndex(Enum): r"""Enumeration to associate each column index of a TableData instance with a word""" + LR_DATA = 0 LR_NORM = 1 LR_CONFIG = 2