Skip to content

Commit e8caaf4

Browse files
pdgendtfabiobaltieri
authored andcommitted
scripts: Bump Python target version for ruff
Now that Python 3.12 is the minimum required version for Zephyr, ruff should target that instead of 3.10. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent e7a7c59 commit e8caaf4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.ruff.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
extend = ".ruff-excludes.toml"
55

66
line-length = 100
7-
target-version = "py310"
7+
target-version = "py312"
88

99
[lint]
1010
select = [

scripts/footprint/pack_as_twister.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
from __future__ import annotations
3535

36-
from datetime import datetime, timezone
36+
from datetime import datetime, UTC
3737
import argparse
3838
import os
3939
import sys
@@ -163,7 +163,7 @@ def main():
163163
skipped = 0
164164
filtered = 0
165165

166-
run_date = datetime.now(timezone.utc).isoformat(timespec='seconds')
166+
run_date = datetime.now(UTC).isoformat(timespec='seconds')
167167

168168
init_logs()
169169

@@ -251,7 +251,7 @@ def main():
251251
res['environment'] = {
252252
'zephyr_version': data_id['version'],
253253
'commit_date':
254-
git_commit.committed_datetime.astimezone(timezone.utc).isoformat(timespec='seconds'),
254+
git_commit.committed_datetime.astimezone(UTC).isoformat(timespec='seconds'),
255255
'run_date': run_date,
256256
'options': {
257257
'testsuite_root': [ plan[r_plan]['application'] ],

scripts/pylib/twister/twisterlib/environment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import subprocess
1717
import sys
1818
from collections.abc import Generator
19-
from datetime import datetime, timezone
19+
from datetime import UTC, datetime
2020
from importlib import metadata
2121
from pathlib import Path
2222

@@ -1107,7 +1107,7 @@ def non_default_options(self) -> dict:
11071107
def discover(self):
11081108
self.check_zephyr_version()
11091109
self.get_toolchain()
1110-
self.run_date = datetime.now(timezone.utc).isoformat(timespec='seconds')
1110+
self.run_date = datetime.now(UTC).isoformat(timespec='seconds')
11111111

11121112
def check_zephyr_version(self):
11131113
try:

0 commit comments

Comments
 (0)