From ecc03a06ec2fe994858e7452a3f95009fcc221a4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 21:31:54 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- reflectivity_ui/config/__init__.py | 2 +- reflectivity_ui/interfaces/data_handling/data_info.py | 1 + reflectivity_ui/interfaces/data_handling/data_manipulation.py | 1 + reflectivity_ui/interfaces/data_handling/data_set.py | 1 + reflectivity_ui/interfaces/data_handling/filepath.py | 3 ++- reflectivity_ui/interfaces/data_handling/instrument.py | 1 + reflectivity_ui/interfaces/data_handling/peak_finding.py | 1 - .../interfaces/data_handling/processing_workflow.py | 1 + reflectivity_ui/interfaces/event_handlers/widgets.py | 1 + reflectivity_ui/interfaces/reduction_dialog.py | 1 + reflectivity_ui/interfaces/result_viewer.py | 1 + 11 files changed, 11 insertions(+), 3 deletions(-) diff --git a/reflectivity_ui/config/__init__.py b/reflectivity_ui/config/__init__.py index 0226dc50..4c41e996 100644 --- a/reflectivity_ui/config/__init__.py +++ b/reflectivity_ui/config/__init__.py @@ -2,7 +2,6 @@ General settings """ - # standard imports import json import os @@ -13,6 +12,7 @@ class Settings(object): r"""Singleton object containing the GUI settings as a dictionary""" + _instance = None def __new__(cls, *args, **kwargs): diff --git a/reflectivity_ui/interfaces/data_handling/data_info.py b/reflectivity_ui/interfaces/data_handling/data_info.py index 71349b5d..12448147 100644 --- a/reflectivity_ui/interfaces/data_handling/data_info.py +++ b/reflectivity_ui/interfaces/data_handling/data_info.py @@ -1,6 +1,7 @@ """ Meta-data information for MR reduction """ + # pylint: disable=too-few-public-methods, wrong-import-position, too-many-instance-attributes, wrong-import-order import sys diff --git a/reflectivity_ui/interfaces/data_handling/data_manipulation.py b/reflectivity_ui/interfaces/data_handling/data_manipulation.py index 946c505d..8511c287 100644 --- a/reflectivity_ui/interfaces/data_handling/data_manipulation.py +++ b/reflectivity_ui/interfaces/data_handling/data_manipulation.py @@ -1,6 +1,7 @@ """ Methods used to process data, usually calling Mantid """ + # pylint: disable=invalid-name, too-many-instance-attributes, line-too-long, multiple-statements, bare-except, protected-access, wrong-import-position import sys diff --git a/reflectivity_ui/interfaces/data_handling/data_set.py b/reflectivity_ui/interfaces/data_handling/data_set.py index bf245f06..9ae3270d 100644 --- a/reflectivity_ui/interfaces/data_handling/data_set.py +++ b/reflectivity_ui/interfaces/data_handling/data_set.py @@ -2,6 +2,7 @@ Loader for event nexus files. Uses Mantid Framework """ + # pylint: disable=invalid-name, too-many-instance-attributes, line-too-long, multiple-statements, bare-except, wrong-import-order, \ # too-many-locals, too-few-public-methods, wrong-import-position, too-many-public-methods diff --git a/reflectivity_ui/interfaces/data_handling/filepath.py b/reflectivity_ui/interfaces/data_handling/filepath.py index 2e0f31d7..16a7bd87 100644 --- a/reflectivity_ui/interfaces/data_handling/filepath.py +++ b/reflectivity_ui/interfaces/data_handling/filepath.py @@ -2,7 +2,6 @@ Classes to handle string representations of sets of run numbers and absolute paths to data files """ - # standard imports import itertools import operator @@ -15,6 +14,7 @@ class RunNumbers(object): A helper class to handle string representations of one or more run numbers. It translates from a string representation to a list of run numbers, and viceversa """ + merge_symbol = "+" range_symbol = ":" @@ -110,6 +110,7 @@ class FilePath(object): NOTE: Paths are sorted """ + merge_symbol = "+" @classmethod diff --git a/reflectivity_ui/interfaces/data_handling/instrument.py b/reflectivity_ui/interfaces/data_handling/instrument.py index f8e8c886..7461a01f 100644 --- a/reflectivity_ui/interfaces/data_handling/instrument.py +++ b/reflectivity_ui/interfaces/data_handling/instrument.py @@ -3,6 +3,7 @@ that is instrument-specific and abstracts out how we obtain information from the data file """ + # pylint: disable=invalid-name, too-many-instance-attributes, line-too-long, bare-except diff --git a/reflectivity_ui/interfaces/data_handling/peak_finding.py b/reflectivity_ui/interfaces/data_handling/peak_finding.py index 7d85dae1..d9e950dc 100644 --- a/reflectivity_ui/interfaces/data_handling/peak_finding.py +++ b/reflectivity_ui/interfaces/data_handling/peak_finding.py @@ -13,7 +13,6 @@ All rights reserved. """ - import math import numpy as np diff --git a/reflectivity_ui/interfaces/data_handling/processing_workflow.py b/reflectivity_ui/interfaces/data_handling/processing_workflow.py index e3f142ed..05a50da0 100644 --- a/reflectivity_ui/interfaces/data_handling/processing_workflow.py +++ b/reflectivity_ui/interfaces/data_handling/processing_workflow.py @@ -1,6 +1,7 @@ """ Data processing workflow, taking results and writing them to files. """ + # pylint: disable=bare-except, too-many-locals import sys diff --git a/reflectivity_ui/interfaces/event_handlers/widgets.py b/reflectivity_ui/interfaces/event_handlers/widgets.py index 0edee96f..20c65332 100644 --- a/reflectivity_ui/interfaces/event_handlers/widgets.py +++ b/reflectivity_ui/interfaces/event_handlers/widgets.py @@ -1,6 +1,7 @@ """ Zoo for customized simple widgets """ + from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QPushButton diff --git a/reflectivity_ui/interfaces/reduction_dialog.py b/reflectivity_ui/interfaces/reduction_dialog.py index 236e0305..39d8b25a 100644 --- a/reflectivity_ui/interfaces/reduction_dialog.py +++ b/reflectivity_ui/interfaces/reduction_dialog.py @@ -2,6 +2,7 @@ Dialog to select reduction options to choose which outputs are needed and in which formats to write them. """ + # pylint: disable=bare-except import os diff --git a/reflectivity_ui/interfaces/result_viewer.py b/reflectivity_ui/interfaces/result_viewer.py index 9c9525e3..531be4ee 100644 --- a/reflectivity_ui/interfaces/result_viewer.py +++ b/reflectivity_ui/interfaces/result_viewer.py @@ -1,6 +1,7 @@ """ Dialog to show final reduced data. """ + # pylint: disable=bare-except import logging