From fcff2ec49edc63c3bb554b47e1a15cb0e8e7f0b6 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 5 Jun 2026 15:20:32 +0100 Subject: [PATCH 1/6] Updated all instances of PLR6301 failing and removed from pyproject.toml --- process/core/io/vary_run/config.py | 3 +- process/core/scan.py | 9 ++++-- process/main.py | 11 +++++-- process/models/availability.py | 15 ++++------ process/models/blankets/blanket_library.py | 6 ++-- process/models/blankets/hcpb.py | 10 ++++--- process/models/build.py | 4 +-- process/models/costs/costs_2015.py | 6 ++-- process/models/divertor.py | 4 +-- process/models/ife.py | 9 ++++-- process/models/pfcoil.py | 16 ++++++----- pyproject.toml | 4 +-- tests/integration/test_vmcon.py | 30 +++++++++++++------- tests/regression/regression_test_assets.py | 7 +++-- tests/regression/test_process_input_files.py | 3 +- tests/unit/models/test_divertor.py | 6 ++-- tests/unit/models/test_structure.py | 3 +- tests/unit/models/test_vacuum.py | 6 ++-- 18 files changed, 91 insertions(+), 61 deletions(-) diff --git a/process/core/io/vary_run/config.py b/process/core/io/vary_run/config.py index c267881d6a..a289cc13b3 100644 --- a/process/core/io/vary_run/config.py +++ b/process/core/io/vary_run/config.py @@ -280,7 +280,8 @@ def setup(self): ) data_structure.global_variables.fileprefix = str(self.wdir / self.infile) - def run_process(self, input_path: Path, solver: str = "vmcon"): + @staticmethod + def run_process(input_path: Path, solver: str = "vmcon"): """Perform a single run of PROCESS, catching any errors. Parameters diff --git a/process/core/scan.py b/process/core/scan.py index 7a33222c49..30c157676b 100644 --- a/process/core/scan.py +++ b/process/core/scan.py @@ -664,7 +664,8 @@ def post_optimise(self, ifail: int): ), ) - def verror(self, ifail: int): + @staticmethod + def verror(ifail: int): """Routine to print out relevant messages in the case of an unfeasible result from a VMCON (optimisation) run @@ -952,7 +953,8 @@ def scan_2d(self): ) print(f"\nConvergence Percentage: {converged_percentage:.2f}%") - def scan_2d_init(self): + @staticmethod + def scan_2d_init(): process_output.ovarin( constants.MFILE, "Number of first variable scan points", @@ -1051,7 +1053,8 @@ def scan_2d_write_point_header(self, iscan, iscan_1, iscan_2): return iscan_r - def scan_1d_write_plot(self): + @staticmethod + def scan_1d_write_plot(): if scan_variables.first_call_1d: process_output.ovarin( constants.MFILE, diff --git a/process/main.py b/process/main.py index 1c2a0f49ae..4291e06d2a 100644 --- a/process/main.py +++ b/process/main.py @@ -96,7 +96,10 @@ PlasmaBeta, PlasmaInductance, ) -from process.models.physics.plasma_current import PlasmaCurrent, PlasmaDiamagneticCurrent +from process.models.physics.plasma_current import ( + PlasmaCurrent, + PlasmaDiamagneticCurrent, +) from process.models.physics.plasma_fields import PlasmaFields from process.models.physics.plasma_geometry import PlasmaGeom from process.models.physics.plasma_profiles import PlasmaProfile @@ -438,11 +441,13 @@ def run_scan(self): ) self.scan = Scan(self.models, self.solver, self.data) - def show_errors(self): + @staticmethod + def show_errors(): """Report all informational/error messages encountered.""" show_errors(constants.NOUT) - def finish(self): + @staticmethod + def finish(): """Run the finish subroutine to close files open in the Fortran. Files being handled by Fortran must be closed before attempting to diff --git a/process/models/availability.py b/process/models/availability.py index 9040871468..aca0568a3f 100644 --- a/process/models/availability.py +++ b/process/models/availability.py @@ -783,11 +783,9 @@ def calc_u_unplanned_divertor(self, output: bool) -> float: # Integrating the instantaneous availability gives the mean # availability over the planned cycle life N if self.data.costs.div_nu <= self.data.costs.div_nref: - logger.error( - """div_nu <= div_nref + logger.error("""div_nu <= div_nref The cycle when the divertor fails with 100% probability <= & Reference value for cycle life of divertor - """ - ) + """) po.ocmmnt( self.outfile, "ERROR: The cycle when the divertor fails with 100% probability & <= Reference value for cycle cycle life of divertor", @@ -895,11 +893,9 @@ def calc_u_unplanned_fwbs(self, output: bool) -> float: ) if self.data.costs.fwbs_nu <= self.data.costs.fwbs_nref: - logger.error( - """fwbs_nu <= fwbs_nref + logger.error("""fwbs_nu <= fwbs_nref The cycle when the blanket fails with 100% probability <= &Reference value for cycle life of blanket - """ - ) + """) po.ocmmnt( self.outfile, "EROROR: The cycle when the blanket fails with 100% probability& <= Reference value for cycle life of blanket", @@ -1029,7 +1025,8 @@ def calc_u_unplanned_bop(self, output: bool) -> float: return u_unplanned_bop - def calc_u_unplanned_hcd(self) -> float: + @staticmethod + def calc_u_unplanned_hcd() -> float: """Calculates the unplanned unavailability of the heating and current drive system diff --git a/process/models/blankets/blanket_library.py b/process/models/blankets/blanket_library.py index 5c9024d1c8..9fca3b569e 100644 --- a/process/models/blankets/blanket_library.py +++ b/process/models/blankets/blanket_library.py @@ -3214,8 +3214,8 @@ def pipe_hydraulic_diameter(self, i_channel_shape): f"i_channel_shape ={i_channel_shape} is an invalid option." ) + @staticmethod def elbow_coeff( - self, radius_pipe_elbow: float, deg_pipe_elbow: float, darcy_friction: float, @@ -3465,8 +3465,8 @@ def calculate_basic_geometry(self): b_bz_liq=self.data.fwbs.b_bz_liq, ) + @staticmethod def calculate_blanket_outboard_module_geometry( - self, n_blkt_outboard_modules_toroidal: int, rmajor: float, rminor: float, @@ -3512,8 +3512,8 @@ def calculate_basic_geometry(self): self.set_blanket_module_geometry() + @staticmethod def calculate_blanket_inboard_module_geometry( - self, n_blkt_inboard_modules_toroidal: int, rmajor: float, rminor: float, diff --git a/process/models/blankets/hcpb.py b/process/models/blankets/hcpb.py index ab23d03291..2cc6729a17 100644 --- a/process/models/blankets/hcpb.py +++ b/process/models/blankets/hcpb.py @@ -575,8 +575,8 @@ def nuclear_heating_magnets(self, output: bool): self.data.tfcoil.m_tf_coils_total, ) + @staticmethod def nuclear_heating_fw( - self, m_fw_total: float, fw_armour_u_nuc_heating: float, p_fusion_total_mw: float, @@ -617,8 +617,9 @@ def nuclear_heating_fw( ) return p_fw_nuclear_heat_total_mw + @staticmethod def nuclear_heating_blanket( - self, m_blkt_total: float, p_fusion_total_mw: float + m_blkt_total: float, p_fusion_total_mw: float ) -> tuple[float, float]: """Calculates the nuclear heating in the blanket for the CCFE HCPB model. @@ -662,8 +663,8 @@ def nuclear_heating_blanket( return p_blkt_nuclear_heat_total_mw, exp_blanket + @staticmethod def nuclear_heating_shield( - self, itart: int, dr_shld_outboard: float, dr_shld_inboard: float, @@ -965,7 +966,8 @@ def powerflow_calc(self, output: bool): self.data.fwbs.radius_blkt_channel_180_bend, ) - def st_cp_angle_fraction(self, z_cp_top, r_cp_mid, r_cp_top, rmajor): + @staticmethod + def st_cp_angle_fraction(z_cp_top, r_cp_mid, r_cp_top, rmajor): """ Estimates the CP angular solid angle coverage fration Equation (1-3) from diff --git a/process/models/build.py b/process/models/build.py index 0c7daea60f..f9bf46a6c9 100644 --- a/process/models/build.py +++ b/process/models/build.py @@ -55,8 +55,8 @@ def run(self): dx_beam_shield=self.data.current_drive.dx_beam_shield, ) + @staticmethod def calculate_beam_port_size( - self, f_radius_beam_tangency_rmajor: float, rmajor: float, n_tf_coils: int, @@ -1458,8 +1458,8 @@ def divgeom(self, output: bool): ) return divht + @staticmethod def plasma_outboard_edge_toroidal_ripple( - self, ripple_b_tf_plasma_edge_max: float, r_tf_outboard_mid: float, n_tf_coils: int, diff --git a/process/models/costs/costs_2015.py b/process/models/costs/costs_2015.py index 69158a8143..579270d23d 100644 --- a/process/models/costs/costs_2015.py +++ b/process/models/costs/costs_2015.py @@ -1236,7 +1236,8 @@ def calc_remaining_subsystems(self): for j in range(35, 60): self.data.costs_2015.s_cost[60] += self.data.costs_2015.s_cost[j] - def value_function(self, x): + @staticmethod + def value_function(x): """Value function Function for separative work unit calculation for enrichment cost PROCESS Costs Paper (M. Kovari, J. Morris) @@ -1244,7 +1245,8 @@ def value_function(self, x): """ return (1.0e0 - 2.0e0 * x) * np.log((1.0e0 - x) / x) - def ocost(self, file, descr, vname, value): + @staticmethod + def ocost(file, descr, vname, value): """Routine to print out the code, description and value of a cost item from array s in costs_2015 diff --git a/process/models/divertor.py b/process/models/divertor.py index 8e1411e33c..0fab453d48 100644 --- a/process/models/divertor.py +++ b/process/models/divertor.py @@ -358,8 +358,8 @@ def divwade( ) return self.data.divertor.pflux_div_heat_load_mw + @staticmethod def incident_radiation_power( - self, p_plasma_rad_mw: float, f_ster_div_single: float, n_divertors: int, @@ -382,8 +382,8 @@ def incident_radiation_power( """ return p_plasma_rad_mw * f_ster_div_single * n_divertors + @staticmethod def incident_neutron_power( - self, p_plasma_neutron_mw: float, f_ster_div_single: float, n_divertors: int, diff --git a/process/models/ife.py b/process/models/ife.py index a66c7cf3a5..8e46671f5e 100644 --- a/process/models/ife.py +++ b/process/models/ife.py @@ -1460,7 +1460,8 @@ def ifephy(self, output: bool = False): self.data.physics.pflux_fw_neutron_mw, ) - def driver(self, edrive, gainve, etave): + @staticmethod + def driver(edrive, gainve, etave): """Routine to calculate parameters of a generic driver suitable for inertial fusion energy @@ -1512,7 +1513,8 @@ def driver(self, edrive, gainve, etave): return gain, etadrv - def lasdrv(self, edrive): + @staticmethod + def lasdrv(edrive): """Routine to calculate parameters of a laser driver suitable for inertial fusion energy @@ -1569,7 +1571,8 @@ def lasdrv(self, edrive): return gain, etadrv - def iondrv(self, edrive): + @staticmethod + def iondrv(edrive): """Routine to calculate parameters of a heavy ion driver suitable for inertial fusion energy diff --git a/process/models/pfcoil.py b/process/models/pfcoil.py index 774ad6974e..0ec309ab31 100644 --- a/process/models/pfcoil.py +++ b/process/models/pfcoil.py @@ -1514,7 +1514,8 @@ def tf_pf_collision_detector(self): "One or more collision between TF and PF coils. Check PF placement." ) - def solv(self, n_pf_groups_max, n_pf_coil_groups, nrws, gmat, bvec): + @staticmethod + def solv(n_pf_groups_max, n_pf_coil_groups, nrws, gmat, bvec): """Solve a matrix using singular value decomposition. This routine solves the matrix equation for calculating the @@ -2850,7 +2851,8 @@ def outvolt(self): * self.data.pf_coil.n_pf_coil_turns[k], ) - def selfinductance(self, a, b, c, n): + @staticmethod + def selfinductance(a, b, c, n): """Calculates the selfinductance using Bunet's formula. @@ -2967,8 +2969,8 @@ def output(self): def run(self): """This model doesn't need to be run""" + @staticmethod def calculate_cs_geometry( - self, z_tf_inside_half: float, f_z_cs_tf_internal: float, dr_cs: float, @@ -3041,8 +3043,8 @@ def calculate_cs_geometry( dr_cs_full, ) + @staticmethod def calculate_cs_turn_geometry_eu_demo( - self, a_cs_turn: float, f_dr_dz_cs_turn: float, radius_cs_turn_corners: float, @@ -3119,8 +3121,8 @@ def calculate_cs_turn_geometry_eu_demo( dz_cs_turn_conduit, ) + @staticmethod def place_cs_filaments( - self, n_cs_current_filaments: int, r_cs_middle: float, z_cs_inside_half: float, @@ -3580,8 +3582,8 @@ def ohcalc(self): ) self.calculate_cs_self_midplane_axial_stress_time_profile() + @staticmethod def calculate_cs_self_peak_magnetic_field( - self, j_cs: float, r_cs_inner: float, r_cs_outer: float, @@ -3720,8 +3722,8 @@ def output_cs_structure(self): "OP ", ) + @staticmethod def calculate_cs_self_peak_midplane_axial_stress( - self, r_cs_outer: float, r_cs_inner: float, dz_cs_half: float, diff --git a/pyproject.toml b/pyproject.toml index 1c82d46137..db9ff194e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,7 +116,7 @@ dependencies = ["pre-commit", "ruff", "ty"] [tool.hatch.envs.lint.scripts] fmt = ["pre-commit run --all-files --hook-stage manual {args:}"] -fmt_extra = ["ruff check --select=E501,PLR6301,C901,PLR0904,PLR0911,PLR0912,PLR0913,PLR0914,PLR0915,PLR0916,PLR0917,PLR1702,D100,D101,D102,D103,DOC501,D404,DOC102,D104,D105,PLC1901,S307 {args:.}"] +fmt_extra = ["ruff check --select=E501,C901,PLR0904,PLR0911,PLR0912,PLR0913,PLR0914,PLR0915,PLR0916,PLR0917,PLR1702,D100,D101,D102,D103,DOC501,D404,DOC102,D104,D105,PLC1901,S307 {args:.}"] [tool.coverage.report] exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] @@ -165,7 +165,6 @@ max-locals = 17 "tests/**" = [ "ARG", "PLR2004", - "PLR6301", "PLR0904", "PLC1901", "S101", @@ -237,7 +236,6 @@ ignore = [ # urgent removal remainder "E501", - "PLR6301", # complexity "C901", "PLR0904", diff --git a/tests/integration/test_vmcon.py b/tests/integration/test_vmcon.py index 1630840081..1b179dc338 100644 --- a/tests/integration/test_vmcon.py +++ b/tests/integration/test_vmcon.py @@ -115,7 +115,8 @@ class Evaluator1(CustomFunctionEvaluator): :type CustomFunctionEvaluator: CustomFunctionEvaluator """ - def fcnvmc1(self, n, m, x, ifail): + @staticmethod + def fcnvmc1(n, m, x, ifail): """Function evaluator. @@ -141,7 +142,8 @@ def fcnvmc1(self, n, m, x, ifail): return objf, conf - def fcnvmc2(self, n, m, x, lcnorm): + @staticmethod + def fcnvmc2(n, m, x, lcnorm): """Gradient function evaluator. Calculates the gradients of the objective and constraint functions at @@ -178,7 +180,8 @@ class Evaluator2(CustomFunctionEvaluator): :type CustomFunctionEvaluator: CustomFunctionEvaluator """ - def fcnvmc1(self, n, m, x, ifail): + @staticmethod + def fcnvmc1(n, m, x, ifail): """Function evaluator. @@ -204,7 +207,8 @@ def fcnvmc1(self, n, m, x, ifail): return objf, conf - def fcnvmc2(self, n, m, x, lcnorm): + @staticmethod + def fcnvmc2(n, m, x, lcnorm): """Gradient function evaluator. Calculates the gradients of the objective and constraint functions at @@ -242,7 +246,8 @@ class Evaluator3(CustomFunctionEvaluator): :type CustomFunctionEvaluator: CustomFunctionEvaluator """ - def fcnvmc1(self, n, m, x, ifail): + @staticmethod + def fcnvmc1(n, m, x, ifail): """Function evaluator. @@ -265,7 +270,8 @@ def fcnvmc1(self, n, m, x, ifail): return objf, conf - def fcnvmc2(self, n, m, x, lcnorm): + @staticmethod + def fcnvmc2(n, m, x, lcnorm): """Gradient function evaluator. Calculates the gradients of the objective and constraint functions at @@ -303,7 +309,8 @@ class Evaluator4(CustomFunctionEvaluator): :type CustomFunctionEvaluator: CustomFunctionEvaluator """ - def fcnvmc1(self, n, m, x, ifail): + @staticmethod + def fcnvmc1(n, m, x, ifail): """Function evaluator. Calculates the objective and constraint functions at the @@ -325,7 +332,8 @@ def fcnvmc1(self, n, m, x, ifail): return objf, conf - def fcnvmc2(self, n, m, x, lcnorm): + @staticmethod + def fcnvmc2(n, m, x, lcnorm): """Gradient function evaluator. Calculates the gradients of the objective and constraint functions at @@ -358,7 +366,8 @@ class Evaluator5(CustomFunctionEvaluator): :type CustomFunctionEvaluator: CustomFunctionEvaluator """ - def fcnvmc1(self, n, m, x, ifail): + @staticmethod + def fcnvmc1(n, m, x, ifail): """Function evaluator. Calculates the objective and constraint functions at the @@ -380,7 +389,8 @@ def fcnvmc1(self, n, m, x, ifail): return objf, conf - def fcnvmc2(self, n, m, x, lcnorm): + @staticmethod + def fcnvmc2(n, m, x, lcnorm): """Gradient function evaluator. Calculates the gradients of the objective and constraint functions at diff --git a/tests/regression/regression_test_assets.py b/tests/regression/regression_test_assets.py index 3f63eb0128..9187cff364 100644 --- a/tests/regression/regression_test_assets.py +++ b/tests/regression/regression_test_assets.py @@ -82,14 +82,14 @@ def get_reference_mfile(self, scenario_name: str, target_hash: str | None = None return None - def _git_commit_hashes(self): + def _git_commit_hashes(): """Returns the list of commit hashes. :returns: a list of commit hashes from 'git log' :rtype: list[str] """ return ( - subprocess # noqa: S602 + subprocess .run( 'git log --format="%H"', # noqa: S607 shell=True, @@ -125,7 +125,8 @@ def _get_tracked_mfiles(self): key=lambda m: self._hashes.index(m.hash), ) - def _get_tracked_mfile(self, file: Path): + @staticmethod + def _get_tracked_mfile(file: Path): """Converts JSON data of a file tracked on GitHub into a `TrackedMFile`, if appropriate diff --git a/tests/regression/test_process_input_files.py b/tests/regression/test_process_input_files.py index 0b62666dd7..207a4b70e2 100644 --- a/tests/regression/test_process_input_files.py +++ b/tests/regression/test_process_input_files.py @@ -38,7 +38,8 @@ class ProcessModelFilter(logging.Filter): - def filter(self, record): + @staticmethod + def filter(record): return 0 if record.levelno < logging.CRITICAL else 1 diff --git a/tests/unit/models/test_divertor.py b/tests/unit/models/test_divertor.py index 6184c6a864..61aef5e3f9 100644 --- a/tests/unit/models/test_divertor.py +++ b/tests/unit/models/test_divertor.py @@ -14,7 +14,8 @@ def divertor(process_models): class TestDivertor: - def test_divtart(self, monkeypatch, divertor): + @staticmethod + def test_divtart(monkeypatch, divertor): """Test the divtart subroutine. Uses test data from the second call of this subroutine by FNSF regression test. @@ -54,7 +55,8 @@ def test_divtart(self, monkeypatch, divertor): assert pflux_div_heat_load_mw == pytest.approx(expected_pflux_div_heat_load_mw) - def test_divwade(self, monkeypatch, divertor): + @staticmethod + def test_divwade(monkeypatch, divertor): """Test the divwade subroutine. Uses test data from the second call of this subroutine by FNSF regression test. diff --git a/tests/unit/models/test_structure.py b/tests/unit/models/test_structure.py index 9b79c3898d..816ee4a626 100644 --- a/tests/unit/models/test_structure.py +++ b/tests/unit/models/test_structure.py @@ -16,7 +16,8 @@ def structure(): class TestStructure: - def test_structure(self, structure): + @staticmethod + def test_structure(structure): """Tests the structure subroutine""" expected_fncmass = 310716.52923547616 diff --git a/tests/unit/models/test_vacuum.py b/tests/unit/models/test_vacuum.py index f976f0ef5a..7c869820e2 100644 --- a/tests/unit/models/test_vacuum.py +++ b/tests/unit/models/test_vacuum.py @@ -24,7 +24,8 @@ def vacuum_vessel(process_models): class TestVacuum: - def test_simple_model(self, monkeypatch, vacuum): + @staticmethod + def test_simple_model(monkeypatch, vacuum): """Tests `vacuum_simple` subroutine. Values taken from first calling of the model in i_vacuum_pumping regression test. @@ -57,7 +58,8 @@ def test_simple_model(self, monkeypatch, vacuum): assert n_iter_vacuum_pumps == pytest.approx(14.082585474801862) - def test_old_model(self, monkeypatch, vacuum): + @staticmethod + def test_old_model(monkeypatch, vacuum): """Test `vacuum` subroutine. Values taken from first calling of the model in G-L_Nb-Ti regression test. From 7ce97aae7875525f737ffa71b3050d72a62d4e4f Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 5 Jun 2026 15:51:18 +0100 Subject: [PATCH 2/6] Made _git_commit_hashes and classmethod --- tests/regression/regression_test_assets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/regression/regression_test_assets.py b/tests/regression/regression_test_assets.py index 9187cff364..9bbc60cd4f 100644 --- a/tests/regression/regression_test_assets.py +++ b/tests/regression/regression_test_assets.py @@ -82,7 +82,8 @@ def get_reference_mfile(self, scenario_name: str, target_hash: str | None = None return None - def _git_commit_hashes(): + @classmethod + def _git_commit_hashes(cls): """Returns the list of commit hashes. :returns: a list of commit hashes from 'git log' From 26b2573ca19ba8b3f3611c7c6e36f973004ba4a4 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 5 Jun 2026 16:03:39 +0100 Subject: [PATCH 3/6] Added missing staticmethod --- process/models/blankets/blanket_library.py | 1 + 1 file changed, 1 insertion(+) diff --git a/process/models/blankets/blanket_library.py b/process/models/blankets/blanket_library.py index 63c3b0dae4..f0ec7d9680 100644 --- a/process/models/blankets/blanket_library.py +++ b/process/models/blankets/blanket_library.py @@ -3572,6 +3572,7 @@ def calculate_blkt_outboard_poloidal_plasma_angle( ) ) + @staticmethod def calculate_blanket_outboard_module_geometry( n_blkt_outboard_modules_toroidal: int, rmajor: float, From 3798edaf8c9cf5fc139e4f81ec1eae4c73e8940c Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 5 Jun 2026 16:20:47 +0100 Subject: [PATCH 4/6] Replaced noqa --- tests/regression/regression_test_assets.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/regression/regression_test_assets.py b/tests/regression/regression_test_assets.py index 9bbc60cd4f..8068c1778e 100644 --- a/tests/regression/regression_test_assets.py +++ b/tests/regression/regression_test_assets.py @@ -90,10 +90,9 @@ def _git_commit_hashes(cls): :rtype: list[str] """ return ( - subprocess - .run( + subprocess.run( 'git log --format="%H"', # noqa: S607 - shell=True, + shell=True, # noqa: S602 capture_output=True, check=True, ) From 140d34c2032b87fab6c540431ad850615d65ecd8 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 5 Jun 2026 16:36:13 +0100 Subject: [PATCH 5/6] Replaced noqa --- tests/regression/regression_test_assets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/regression/regression_test_assets.py b/tests/regression/regression_test_assets.py index 8068c1778e..12ffbcc9fe 100644 --- a/tests/regression/regression_test_assets.py +++ b/tests/regression/regression_test_assets.py @@ -90,9 +90,9 @@ def _git_commit_hashes(cls): :rtype: list[str] """ return ( - subprocess.run( + subprocess.run( # noqa: S602 'git log --format="%H"', # noqa: S607 - shell=True, # noqa: S602 + shell=True, capture_output=True, check=True, ) From 9bda1314f7ecb38538205176cc6aeccc33a99a8f Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 5 Jun 2026 16:39:16 +0100 Subject: [PATCH 6/6] Fixed autoformatting breaking noqa --- tests/regression/regression_test_assets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/regression/regression_test_assets.py b/tests/regression/regression_test_assets.py index 12ffbcc9fe..ee0431c63d 100644 --- a/tests/regression/regression_test_assets.py +++ b/tests/regression/regression_test_assets.py @@ -90,7 +90,8 @@ def _git_commit_hashes(cls): :rtype: list[str] """ return ( - subprocess.run( # noqa: S602 + subprocess # noqa: S602 + .run( 'git log --format="%H"', # noqa: S607 shell=True, capture_output=True,