Skip to content

Commit 75c526a

Browse files
pkchgvanrossum
authored andcommitted
Fix bug in cache log (#3443)
1 parent ccd95e6 commit 75c526a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/waiter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def sort_function(cmd: LazySubprocess) -> Tuple[Any, int, float]:
339339

340340
if self.new_log: # don't append empty log, it will corrupt the cache file
341341
# log only LOGSIZE most recent tests
342-
test_log = (self.load_log_file() + [self.new_log])[:self.LOGSIZE]
342+
test_log = (self.load_log_file() + [self.new_log])[-self.LOGSIZE:]
343343
try:
344344
with open(self.FULL_LOG_FILENAME, 'w') as fp:
345345
json.dump(test_log, fp, sort_keys=True, indent=4)

0 commit comments

Comments
 (0)