mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-11 01:28:19 +03:00
Fix mypy failures
This commit is contained in:
parent
d5c48ddb94
commit
ba1b3c3c2d
@ -126,7 +126,7 @@ class PatchFile(StreamingJob):
|
||||
|
||||
def read_from_src(self, b: memoryview, pos: int) -> int:
|
||||
self.src_file.seek(pos)
|
||||
return self.src_file.readinto(b) # type: ignore
|
||||
return self.src_file.readinto(b)
|
||||
|
||||
def close(self) -> None:
|
||||
if not self.src_file.closed:
|
||||
|
@ -104,7 +104,8 @@ def layout_dimension(
|
||||
) -> LayoutDimension:
|
||||
number_of_windows = len(decoration_pairs)
|
||||
number_of_cells = length // cell_length
|
||||
space_needed_for_decorations: int = sum(map(sum, decoration_pairs))
|
||||
dec_vals: Iterable[int] = map(sum, decoration_pairs)
|
||||
space_needed_for_decorations = sum(dec_vals)
|
||||
extra = length - number_of_cells * cell_length
|
||||
while extra < space_needed_for_decorations:
|
||||
number_of_cells -= 1
|
||||
|
Loading…
Reference in New Issue
Block a user