Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 28, 2023
1 parent 533fdf7 commit 94207ab
Show file tree
Hide file tree
Showing 71 changed files with 0 additions and 123 deletions.
1 change: 0 additions & 1 deletion RefRed/about_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class AboutDialog(object):

parent = None

def __init__(self, parent=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class PopulateReductionTableFromListLRData(object):

list_lrdata_sorted = None
list_wks_sorted = None
list_runs_sorted = None
Expand All @@ -12,7 +11,6 @@ class PopulateReductionTableFromListLRData(object):
THI_TOLERANCE = 0.015

def __init__(self, parent=None, list_lrdata=None, list_wks=None, list_run=None, list_nexus=None, is_data=True):

self.parent = parent
self.list_run = list_run
self.list_lrdata = list_lrdata
Expand Down
3 changes: 0 additions & 3 deletions RefRed/autopopulatemaintable/reductiontable_auto_fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


class ReductionTableAutoFill(object):

list_full_file_name = []
list_nxs = []
list_lrdata = []
Expand All @@ -33,7 +32,6 @@ class ReductionTableAutoFill(object):
o_auto_fill_widgets_handler = None

def __init__(self, parent=None, list_of_run_from_input='', data_type_selected='data', reset_table=False):

self.parent = parent

if data_type_selected == 'data':
Expand Down Expand Up @@ -85,7 +83,6 @@ def __init__(self, parent=None, list_of_run_from_input='', data_type_selected='d
self.run()

def merge_list_of_runs(self, new_runs=None):

# manual entry of the runs
self.raw_run_from_input = new_runs
self.calculate_discrete_list_of_runs() # step1 -> list_of_runs_from_input
Expand Down
1 change: 0 additions & 1 deletion RefRed/browsing_runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class BrowsingRuns(object):

list_files = None
list_runs = None

Expand Down
2 changes: 0 additions & 2 deletions RefRed/calculations/add_list_nexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class AddListNexus(object):

wks = None
addition_worked = True
prefix = 'data'
Expand Down Expand Up @@ -40,7 +39,6 @@ def __init__(
is_same_property = check_same_property.is_same_property

else: # we force true

is_same_property = True

if is_same_property:
Expand Down
1 change: 0 additions & 1 deletion RefRed/calculations/check_if_same_nxs_property.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class CheckIfSameNxsProperty(object):

is_same_property = False
property_name = ''

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


class CheckListRunCompatibilityAndDisplay(object):

runs_are_compatible = False
wks = None
lrdata = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@


class CheckListRunCompatibilityAndDisplayThread(QtCore.QThread):

runs_are_compatible = False
wks = None
lrdata = None
Expand All @@ -35,7 +34,6 @@ def setup(
is_working_with_data_column=True,
is_display_requested=False,
):

self.parent = parent
self.list_run = list_run
self.list_nexus = list_nexus
Expand Down
1 change: 0 additions & 1 deletion RefRed/calculations/compare_two_lrdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

class CompareTwoLRData(object):
def __init__(self, lrdata_1=None, lrdata_2=None):

self.lrdata_1 = lrdata_1
self.lrdata_2 = lrdata_2
self.result_comparison = 0
Expand Down
1 change: 0 additions & 1 deletion RefRed/calculations/load_list_nexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class LoadListNexus(object):

list_nexus = None
list_run = None
prefix = 'data'
Expand Down
1 change: 0 additions & 1 deletion RefRed/calculations/locate_list_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class LocateListRun(object):

list_run = []
list_nexus_found = []
list_run_found = []
Expand Down
1 change: 0 additions & 1 deletion RefRed/calculations/lr_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


class LRData(object):

read_options = dict(
is_auto_tof_finder=True, is_auto_peak_finder=True, back_offset_from_peak=3, bins=50, angle_offset=0.001
)
Expand Down
2 changes: 0 additions & 2 deletions RefRed/calculations/run_sequence_breaker.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
class RunSequenceBreaker(object):

final_list = None
str_final_list = None

def __init__(self, run_sequence=None):

self.final_list = []
self.str_final_list = []

Expand Down
1 change: 0 additions & 1 deletion RefRed/calculations/sort_lrdata_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class SortLRDataList(object):
def __init__(
self, parent=None, list_lrdata=None, list_runs=None, list_wks=None, list_nexus=None, data_type_selected='data'
):

self.list_lrdata = list_lrdata
self.list_runs = list_runs
self.list_wks = list_wks
Expand Down
1 change: 0 additions & 1 deletion RefRed/calculations/update_reduction_table_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ def __init__(self, parent=None, lrdata=None, row=-1):
self.update()

def update(self):

lrdata = self.lrdata
row = self.row
parent = self.parent
Expand Down
1 change: 0 additions & 1 deletion RefRed/configuration/export_stitching_ascii_settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
class ExportStitchingAsciiSettings(object):

fourth_column_flag = True
fourth_column_dq0 = 0.0004
fourth_column_dq_over_q = 0.023
Expand Down
3 changes: 0 additions & 3 deletions RefRed/configuration/export_xml_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


class ExportXMLConfig(object):

parent = None
filename = ''
str_array = []
Expand Down Expand Up @@ -60,14 +59,12 @@ def header_part(self):
self.str_array = str_array

def main_part(self):

str_array = self.str_array
_big_table_data = self.parent.big_table_data
nbr_row = self.parent.nbr_row_table_reduction
o_general_settings = GlobalReductionSettingsHandler(parent=self.parent)

for row in range(nbr_row):

_data = _big_table_data[row, 0]
if _data is None:
break
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


class LoadReductionTableFromLConfigDataSet(object):

parent = None

def __init__(self, parent=None):
Expand Down
1 change: 0 additions & 1 deletion RefRed/configuration/loading_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@


class LoadingConfiguration(object):

parent = None
load_config_worked = True
filename = ''
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
class PopulateReductionTableFromLConfigDataSet(object):

parent = None

def __init__(self, parent=None):
Expand Down
1 change: 0 additions & 1 deletion RefRed/configuration/saving_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class SavingConfiguration(object):

parent = None

def __init__(self, parent=None, filename=''):
Expand Down
1 change: 0 additions & 1 deletion RefRed/configuration/user_configuration.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
class UserConfiguration(object):

is_reduced_plot_stitching_tab_ylog = True
is_reduced_plot_stitching_tab_xlog = False

Expand Down
1 change: 0 additions & 1 deletion RefRed/export/export_plot_ascii.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@


class ExportPlotAscii:

# NOTE:
# figure layout as of 10-22-2021
# ------------ main window ------------|
Expand Down
1 change: 0 additions & 1 deletion RefRed/gui_handling/auto_tof_range_radio_button_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class AutoTofRangeRadioButtonHandler(object):

parent = None
all_rows = []
row = -1
Expand Down
8 changes: 0 additions & 8 deletions RefRed/gui_handling/data_norm_spinboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class SpinBox(object):

parent = None

def __init__(self, parent=None, is_data=True, entry_type='peak', value_min=-1, value_max=-1, flag=True):
Expand All @@ -16,7 +15,6 @@ def __init__(self, parent=None, is_data=True, entry_type='peak', value_min=-1, v

all_rows = gui_utility.get_other_row_with_same_run_number_as_row(row=row, is_data=is_data)
for _row in all_rows:

if is_data:
index = 0
else:
Expand Down Expand Up @@ -82,7 +80,6 @@ def __init__(self, parent=None, entry_type='peak', value_min=-1, value_max=-1, f


class DataPeakSpinbox(object):

parent = None

def __init__(self, parent=None):
Expand All @@ -93,7 +90,6 @@ def __init__(self, parent=None):


class DataBackSpinbox(object):

parent = None

def __init__(self, parent=None):
Expand All @@ -105,7 +101,6 @@ def __init__(self, parent=None):


class NormPeakSpinbox(object):

Parent = None

def __init__(self, parent=None):
Expand All @@ -116,7 +111,6 @@ def __init__(self, parent=None):


class NormBackSpinbox(object):

parent = None

def __init__(self, parent=None):
Expand All @@ -128,7 +122,6 @@ def __init__(self, parent=None):


class DataLowResSpinbox(object):

parent = None

def __init__(self, parent=None):
Expand All @@ -140,7 +133,6 @@ def __init__(self, parent=None):


class NormLowResSpinbox(object):

parent = None

def __init__(self, parent=None):
Expand Down
1 change: 0 additions & 1 deletion RefRed/gui_handling/first_angle_range_gui_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def is_sf_button_clicked(self):


class NormalizationOrStitchingButtonStatus(ParentGuiHandler):

is_absolute_normalization = True
is_auto_stitching = False
is_manual_stitching = False
Expand Down
1 change: 0 additions & 1 deletion RefRed/gui_handling/gui_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class GuiUtility(object):

parent = None

def __init__(self, parent=None):
Expand Down
1 change: 0 additions & 1 deletion RefRed/gui_handling/progressbar_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class ProgressBarHandler(object):

nbr_reduction = 0
current_step = 0

Expand Down
1 change: 0 additions & 1 deletion RefRed/gui_handling/refred_interface_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class RefRedInterfaceHandler(object):

from_row = -1
to_row = -1

Expand Down
1 change: 0 additions & 1 deletion RefRed/gui_handling/scaling_factor_widgets_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class ScalingFactorWidgetsHandler(object):

parent = None

def __init__(self, parent=None):
Expand Down
2 changes: 0 additions & 2 deletions RefRed/initialization/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@


class Gui(object):

parent = None
vertical_header = [
"Plotted",
Expand All @@ -29,7 +28,6 @@ class Gui(object):
gui_size_coeff = 2.0 / 3.0

def __init__(self, parent):

self.parent = parent
self.set_gui_title()
self.set_gui_size()
Expand Down
4 changes: 0 additions & 4 deletions RefRed/interfaces/mplwidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ def setup_toolbar(self):
self.adj_window = None

def activate_widget(self, widget_name, activateIt):

if widget_name == "pan":
if activateIt:
self.isPanActivated = True
Expand Down Expand Up @@ -286,7 +285,6 @@ def save_figure(self, *args):
def toggle_ylog(self, *args):
ax = self.canvas.ax
if len(ax.images) == 0 and all([c.__class__.__name__ != "QuadMesh" for c in ax.collections]):

# logstate=ax.get_xscale()
if self.ylog:
ax.set_yscale("linear")
Expand All @@ -310,7 +308,6 @@ def toggle_ylog(self, *args):
def toggle_xlog(self, *args):
ax = self.canvas.ax
if len(ax.images) == 0 and all([c.__class__.__name__ != "QuadMesh" for c in ax.collections]):

if self.xlog:
ax.set_xscale("linear")
else:
Expand All @@ -332,7 +329,6 @@ def toggle_xlog(self, *args):


class MplCanvas(FigureCanvas):

trigger_click = QtCore.Signal(bool, bool, int, int)
trigger_figure_left = QtCore.Signal()

Expand Down
Loading

0 comments on commit 94207ab

Please sign in to comment.