diff --git a/.ruff.toml b/.ruff.toml index 5858ae9e84a..c9be3b43104 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -4,7 +4,7 @@ extend = ".ruff-excludes.toml" line-length = 100 -target-version = "py312" +target-version = "py310" [lint] select = [ diff --git a/scripts/footprint/pack_as_twister.py b/scripts/footprint/pack_as_twister.py index 2383eb7b89a..bd8490a11ba 100755 --- a/scripts/footprint/pack_as_twister.py +++ b/scripts/footprint/pack_as_twister.py @@ -33,7 +33,7 @@ test suite name ('dot separated' format). from __future__ import annotations -from datetime import datetime, UTC +from datetime import datetime, timezone import argparse import os import sys @@ -163,7 +163,7 @@ def main(): skipped = 0 filtered = 0 - run_date = datetime.now(UTC).isoformat(timespec='seconds') + run_date = datetime.now(timezone.utc).isoformat(timespec='seconds') init_logs() @@ -251,7 +251,7 @@ def main(): res['environment'] = { 'zephyr_version': data_id['version'], 'commit_date': - git_commit.committed_datetime.astimezone(UTC).isoformat(timespec='seconds'), + git_commit.committed_datetime.astimezone(timezone.utc).isoformat(timespec='seconds'), 'run_date': run_date, 'options': { 'testsuite_root': [ plan[r_plan]['application'] ], diff --git a/scripts/pylib/twister/twisterlib/environment.py b/scripts/pylib/twister/twisterlib/environment.py index cbc36e12ff8..f956f853c2b 100644 --- a/scripts/pylib/twister/twisterlib/environment.py +++ b/scripts/pylib/twister/twisterlib/environment.py @@ -16,7 +16,7 @@ import shutil import subprocess import sys from collections.abc import Generator -from datetime import UTC, datetime +from datetime import datetime, timezone from importlib import metadata from pathlib import Path @@ -1104,7 +1104,7 @@ class TwisterEnv: def discover(self): self.check_zephyr_version() self.get_toolchain() - self.run_date = datetime.now(UTC).isoformat(timespec='seconds') + self.run_date = datetime.now(timezone.utc).isoformat(timespec='seconds') def check_zephyr_version(self): try: