Skip to content

Commit ab67123

Browse files
committed
ruff
1 parent ff348cc commit ab67123

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

autotest/test_programs.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import warnings
2+
from datetime import UTC
23
from pathlib import Path
34

45
import pytest
@@ -304,7 +305,7 @@ def test_program_manager_error_handling(self):
304305

305306
def test_installation_metadata_integration(self):
306307
"""Test InstallationMetadata integration with ProgramManager."""
307-
from datetime import datetime, timezone
308+
from datetime import datetime
308309
from pathlib import Path
309310

310311
from modflow_devtools.programs import (
@@ -322,7 +323,7 @@ def test_installation_metadata_integration(self):
322323
version="1.0.0",
323324
platform="linux",
324325
bindir=Path("/tmp/test"),
325-
installed_at=datetime.now(timezone.utc),
326+
installed_at=datetime.now(UTC),
326327
source={
327328
"repo": "test/repo",
328329
"tag": "1.0.0",

modflow_devtools/programs/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import shutil
44
import warnings
55
from dataclasses import dataclass, field
6-
from datetime import datetime
6+
from datetime import UTC, datetime
77
from os import PathLike
88
from pathlib import Path
99

@@ -1416,7 +1416,6 @@ def install(
14161416
If installation fails
14171417
"""
14181418
import shutil
1419-
from datetime import timezone
14201419

14211420
# 1. Load config and find program in registries
14221421
config = self.config
@@ -1576,7 +1575,7 @@ def install(
15761575
version=version,
15771576
platform=platform,
15781577
bindir=bindir,
1579-
installed_at=datetime.now(timezone.utc),
1578+
installed_at=datetime.now(UTC),
15801579
source=source_info,
15811580
executables=[exe_name],
15821581
)

0 commit comments

Comments
 (0)