Skip to content

Commit

Permalink
Merge pull request #928 from mantidproject/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
SilkeSchomann authored Aug 15, 2023
2 parents 610d574 + 0200153 commit 6c70e99
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
args: ['--maxkb=4096']

- repo: https://github.com/PyCQA/flake8.git
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
# Have to manually copy this from the .flake8 as flake8 will just ignore the config if the file is passed
Expand Down
4 changes: 2 additions & 2 deletions src/mslice/plotting/plot_window/slice_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
from mslice.plotting.plot_window.iplot import IPlot
from mslice.plotting.plot_window.interactive_cut import InteractiveCut
from mslice.plotting.plot_window.plot_options import SlicePlotOptions
from mslice.plotting.plot_window.overplot_interface import _update_overplot_lines, _update_powder_lines,\
toggle_overplot_line, cif_file_powder_line
from mslice.plotting.plot_window.overplot_interface import (_update_overplot_lines, _update_powder_lines,
toggle_overplot_line, cif_file_powder_line)
from mslice.plotting.pyplot import GlobalFigureManager
from mslice.scripting import generate_script
from mslice.util.compat import legend_set_draggable
Expand Down
2 changes: 1 addition & 1 deletion src/mslice/util/mantid/_workspace_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def op_wrapper(self, other):
}

for alg, attributes in operations.items():
if type(attributes) == str:
if isinstance(attributes, str):
attributes = [attributes]
for attr in attributes:
add_operator_func(attr, alg, attr.startswith('__i'), attr.startswith('__r'))
6 changes: 3 additions & 3 deletions tests/cli_helper_functions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
ConvertToMD)
from unittest import mock
from mslice.workspace import wrap_workspace
from mslice.cli.helperfunctions import _string_to_axis, _string_to_integration_axis, _process_axis,\
_check_workspace_name, _check_workspace_type, _get_workspace_type, is_cut, _get_overplot_key, _update_overplot_checklist, \
_update_legend
from mslice.cli.helperfunctions import (_string_to_axis, _string_to_integration_axis, _process_axis, _check_workspace_name,
_check_workspace_type, _get_workspace_type, is_cut, _get_overplot_key,
_update_overplot_checklist, _update_legend)
from mslice.cli._mslice_commands import Cut
from mslice.models.axis import Axis
from mslice.workspace.histogram_workspace import HistogramWorkspace
Expand Down
3 changes: 1 addition & 2 deletions tests/slice_plot_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ def test_update_legend_in_icut_mode(self):
self.assertEqual(self.slice_plot._canvas.manager.plot_handler.icut.rect.ax, self.axes)

def test_update_legend_in_slice_plot(self):
with patch.object(self.axes, 'legend') as mock_add_legend,\
patch.object(self.axes, 'get_legend') as mock_get_legend:
with patch.object(self.axes, 'legend') as mock_add_legend, patch.object(self.axes, 'get_legend') as mock_get_legend:

mock_get_legend.return_value = MagicMock()

Expand Down
4 changes: 2 additions & 2 deletions tests/workspacemanager_presenter_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from mslice.views.interfaces.workspace_view import WorkspaceView
from mslice.widgets.workspacemanager.command import Command
from mslice.widgets.workspacemanager import TAB_2D, TAB_NONPSD
from mslice.util.mantid.mantid_algorithms import AddSampleLog, CreateWorkspace, CreateSimulationWorkspace,\
ConvertToMD, CloneWorkspace
from mslice.util.mantid.mantid_algorithms import (AddSampleLog, CreateWorkspace, CreateSimulationWorkspace,
ConvertToMD, CloneWorkspace)


class WorkspaceManagerPresenterTest(unittest.TestCase):
Expand Down

0 comments on commit 6c70e99

Please sign in to comment.