Do not round cache mtimes (#4128)
Fixes #4116 This logic was introduced in #3821, I believe as a result of copying logic inside mypy that I think isn't relevant to Black
This commit is contained in:
parent
c80685f361
commit
bf6cabc804
@ -21,6 +21,8 @@
|
||||
|
||||
<!-- Changes to how Black can be configured -->
|
||||
|
||||
- Fix cache mtime logic that resulted in false positive cache hits (#4128)
|
||||
|
||||
### Packaging
|
||||
|
||||
<!-- Changes to how Black is packaged, such as dependency requirements -->
|
||||
|
@ -101,7 +101,7 @@ def is_changed(self, source: Path) -> bool:
|
||||
st = res_src.stat()
|
||||
if st.st_size != old.st_size:
|
||||
return True
|
||||
if int(st.st_mtime) != int(old.st_mtime):
|
||||
if st.st_mtime != old.st_mtime:
|
||||
new_hash = Cache.hash_digest(res_src)
|
||||
if new_hash != old.hash:
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user