diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLAutoProcess.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLAutoProcess.py
index aa53467e4a17e5aa12b5d6702c2a3860ac98a248..b7ea272fd68f8116e2a241fdc0bf5f3ece0959d1 100644
--- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLAutoProcess.py
+++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLAutoProcess.py
@@ -357,7 +357,8 @@ class SANSILLAutoProcess(DataProcessorAlgorithm):
         self.declareProperty('SensitivityWithOffsets', False,
                              'Whether the sensitivity data has been measured with different horizontal offsets.')
 
-    def PyExec(self):
+        # flake8: noqa: C901
+        def PyExec(self):
 
         self.setUp()
         outputs = []