Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ repos:
- id: check-added-large-files
- id: end-of-file-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.20
rev: v0.16.10
hooks:
- id: ruff
args: ["--fix"]
- id: ruff-format
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
rev: v0.11.0.1-1
hooks:
- id: shellcheck
args: ["--severity=warning"]
- repo: https://github.com/rapidsai/pre-commit-hooks
rev: v1.6.0
rev: v1.7.0
hooks:
- id: verify-copyright
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.26.1
rev: v1.30.1
hooks:
- id: zizmor
10 changes: 7 additions & 3 deletions ci/check_conda_nightly_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import json
import re
import sys
from datetime import datetime, timedelta
from datetime import datetime, timedelta, timezone

OLD_PACKAGE_THRESHOLD_DAYS = 3

Expand Down Expand Up @@ -38,7 +38,9 @@ def get_package_date(package):
if match:
# Convert the date-time string to a datetime object
datetime_string = match.group(1)
date_object = datetime.strptime(datetime_string, "%y%m%d%H%M%S")
date_object = datetime.strptime(datetime_string, "%y%m%d%H%M%S").replace(
tzinfo=timezone.utc
)
return date_object

print(
Expand Down Expand Up @@ -82,7 +84,9 @@ def check_env(json_path):
}

# If there are old packages, show an error
today = datetime.now().replace(hour=0, minute=0, second=0, microsecond=0)
today = datetime.now(tz=timezone.utc).replace(
hour=0, minute=0, second=0, microsecond=0
)
old_threshold = today - timedelta(days=OLD_PACKAGE_THRESHOLD_DAYS)
old_packages = {
package: date
Expand Down
Loading