mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-04 15:03:01 +02:00
Enable DTZ004: use datetime.fromtimestamp with UTC timezone
This commit is contained in:
parent
732e6b56d6
commit
0ad0894828
@ -97,8 +97,8 @@ def run_bot(log_level: str = "INFO", decline_correspondence: bool = False) -> No
|
||||
"createdAtDate"
|
||||
)
|
||||
if created_ms:
|
||||
game_date_iso = datetime.datetime.utcfromtimestamp(
|
||||
int(created_ms) / 1000
|
||||
game_date_iso = datetime.datetime.fromtimestamp(
|
||||
int(created_ms) / 1000, tz=datetime.timezone.utc
|
||||
).strftime("%Y.%m.%d")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@ -66,7 +66,6 @@ ignore = [
|
||||
"S110", # try-except-pass - common pattern in scripts
|
||||
"S112", # try-except-continue - acceptable pattern
|
||||
"DTZ005", # datetime.now without tz - acceptable for local scripts
|
||||
"DTZ004", # datetime.utcfromtimestamp - acceptable
|
||||
"PERF401", # manual-list-comprehension - style preference
|
||||
"RUF005", # collection-literal-concatenation - style preference
|
||||
"SIM102", # collapsible-if - style preference
|
||||
|
||||
Loading…
Reference in New Issue
Block a user