mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-09-10 21:06:15 +02:00
fix: don't lint st_birthtime
This commit is contained in:
@@ -19,7 +19,8 @@ def get_date_modified(path_or_stat: Path | os.stat_result) -> float:
|
||||
def get_date_created(path_or_stat: Path | os.stat_result) -> float:
|
||||
stat = _resolve(path_or_stat)
|
||||
if platform.system() in {"Windows", "Darwin"}:
|
||||
return stat.st_birthtime
|
||||
# NOTE: Accessing stat().st_birthtime causes linter checks to fail on some systems.
|
||||
return stat.st_birthtime # type: ignore[attr-defined, unused-ignore]
|
||||
else:
|
||||
return stat.st_ctime
|
||||
|
||||
|
||||
Reference in New Issue
Block a user