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")
|
summary_path = os.path.join(tools.CACHE_PATH, "summary_dir")
|
||||||
open_compressed = functools.partial(gzip.open, compresslevel=1)
|
open_compressed = functools.partial(gzip.open, compresslevel=1)
|
||||||
x, y = self.cursor_position()
|
x, y = self.cursor_position()
|
||||||
if y == 0:
|
entries = itertools.chain([self._entries[y]], itertools.islice(self._entries, y),
|
||||||
entries = []
|
itertools.islice(self._entries, y+1, None)) if y != 0 else []
|
||||||
else:
|
|
||||||
entries = itertools.chain([self._entries[y]], itertools.islice(self._entries, y),
|
|
||||||
itertools.islice(self._entries, y+1, None))
|
|
||||||
state["_old_entries"] = paged_list.PagedList(entries, summary_path, 2000, 1,
|
state["_old_entries"] = paged_list.PagedList(entries, summary_path, 2000, 1,
|
||||||
exist_ok=True, open_func=open_compressed)
|
exist_ok=True, open_func=open_compressed)
|
||||||
state["_entries"] = None
|
state["_entries"] = None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue