Coding style.
- Shave 3 lines.
This commit is contained in:
parent
4bf3f994e6
commit
769b7e2256
1 changed files with 2 additions and 5 deletions
|
|
@ -226,11 +226,8 @@ class Summary:
|
|||
summary_path = os.path.join(tools.CACHE_PATH, "summary_dir")
|
||||
open_compressed = functools.partial(gzip.open, compresslevel=1)
|
||||
x, y = self.cursor_position()
|
||||
if y == 0:
|
||||
entries = []
|
||||
else:
|
||||
entries = itertools.chain([self._entries[y]], itertools.islice(self._entries, y),
|
||||
itertools.islice(self._entries, y+1, None))
|
||||
entries = itertools.chain([self._entries[y]], itertools.islice(self._entries, y),
|
||||
itertools.islice(self._entries, y+1, None)) if y != 0 else []
|
||||
state["_old_entries"] = paged_list.PagedList(entries, summary_path, 2000, 1,
|
||||
exist_ok=True, open_func=open_compressed)
|
||||
state["_entries"] = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue