fix: don't lint st_birthtime

This commit is contained in:
Travis Abendshien
2026-09-10 00:24:27 -07:00
parent 416b19e354
commit 07ec478184
+2 -1
View File
@@ -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