mirror of
https://github.com/vinta/awesome-python.git
synced 2026-10-21 11:12:32 +00:00
refactor: use datetime.UTC alias instead of timezone.utc
Python 3.11 introduced datetime.UTC as a cleaner alias for datetime.timezone.utc. Both build.py and fetch_github_stars.py are updated to use the shorter form. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e47d229528
commit
a358d45ca4
2 changed files with 4 additions and 4 deletions
|
|
@ -4,7 +4,7 @@
|
|||
import json
|
||||
import re
|
||||
import shutil
|
||||
from datetime import datetime, timezone
|
||||
from datetime import UTC, datetime
|
||||
from pathlib import Path
|
||||
from typing import TypedDict
|
||||
|
||||
|
|
@ -189,7 +189,7 @@ def build(repo_root: str) -> None:
|
|||
total_entries=total_entries,
|
||||
total_categories=len(categories),
|
||||
repo_stars=repo_stars,
|
||||
build_date=datetime.now(timezone.utc).strftime("%B %d, %Y"),
|
||||
build_date=datetime.now(UTC).strftime("%B %d, %Y"),
|
||||
sponsors=sponsors,
|
||||
),
|
||||
encoding="utf-8",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue