From a02b162ca789946c76bf45b5a8217d13e7ceb73e Mon Sep 17 00:00:00 2001 From: james <81617086+je-cook@users.noreply.github.com> Date: Thu, 8 Oct 2026 09:33:07 +0100 Subject: [PATCH 1/2] Fix ruff target python version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f3d4491063..e3cac6821c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -135,7 +135,7 @@ markers = [ output-format = "concise" [tool.ruff] -target-version = "py310" +target-version = "py311" line-length = 89 output-format = "concise" output-prefer-rule-codes = true From 6bedd9e3f6d331850c42e32ae75b86bfdc5a91c7 Mon Sep 17 00:00:00 2001 From: james <81617086+je-cook@users.noreply.github.com> Date: Thu, 8 Oct 2026 09:34:15 +0100 Subject: [PATCH 2/2] fix quality check --- process/core/init.py | 6 ++---- process/models/physics/plasma_current.py | 2 +- tracking/tracking_data.py | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/process/core/init.py b/process/core/init.py index c1761ebe64..922a360825 100644 --- a/process/core/init.py +++ b/process/core/init.py @@ -137,10 +137,8 @@ def run_summary(data: DataStructure): process_output.ocmmnt(outfile, f"Git Tag : {git_tag}") process_output.ocmmnt(outfile, f"Git Branch : {git_branch}") - date_string = datetime.datetime.now(datetime.timezone.utc).strftime( - "%d/%m/%Y %Z" - ) - time_string = datetime.datetime.now(datetime.timezone.utc).strftime("%H:%M") + date_string = datetime.datetime.now(datetime.UTC).strftime("%d/%m/%Y %Z") + time_string = datetime.datetime.now(datetime.UTC).strftime("%H:%M") process_output.ocmmnt(outfile, f"Date : {date_string}") process_output.ocmmnt(outfile, f"Time : {time_string}") diff --git a/process/models/physics/plasma_current.py b/process/models/physics/plasma_current.py index 5bda848457..c8d5216bb7 100644 --- a/process/models/physics/plasma_current.py +++ b/process/models/physics/plasma_current.py @@ -439,7 +439,7 @@ def calculate_all_plasma_current_models( triang=triang, triang95=triang95, ) - except ProcessValueError: # noqa: PERF203 + except ProcessValueError: # Since this method is only used for output reporting, if a # Ip model cannot run (e.g. most models don't support negative triang) # then assign it NaN. diff --git a/tracking/tracking_data.py b/tracking/tracking_data.py index 8a2b019adf..8a6c608461 100644 --- a/tracking/tracking_data.py +++ b/tracking/tracking_data.py @@ -403,7 +403,7 @@ def _add_variables(self, json_file_data): data_time_str = f"{date_str.strip()} - {time_str.strip()}" date_time = datetime.datetime.strptime( data_time_str, "%d/%m/%Y - %H:%M" - ).replace(tzinfo=datetime.timezone.utc) + ).replace(tzinfo=datetime.UTC) tracking_data = json_file_data.get( "tracking", []