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 -->
|
<!-- Changes to how Black can be configured -->
|
||||||
|
|
||||||
|
- Fix cache mtime logic that resulted in false positive cache hits (#4128)
|
||||||
|
|
||||||
### Packaging
|
### Packaging
|
||||||
|
|
||||||
<!-- Changes to how Black is packaged, such as dependency requirements -->
|
<!-- 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()
|
st = res_src.stat()
|
||||||
if st.st_size != old.st_size:
|
if st.st_size != old.st_size:
|
||||||
return True
|
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)
|
new_hash = Cache.hash_digest(res_src)
|
||||||
if new_hash != old.hash:
|
if new_hash != old.hash:
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user