Skip to content
Myr

Fix issues previously type ignored.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Andreas Backx · committed by Andreas Backx · parent 3b06e0b · Browse files · 2 files+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−3 removed

  • other:+3 added−3 removed

2 files+3 added−3 removed

modified:src/click/_compat.py+1 added-1 removed
127 unmodified lines
128 x = getattr(self._stream, "writable", None)129 if x is not None:130 return t.cast(bool, x())131 try:132 self._stream.write("") # type: ignore132 self._stream.write(b"")133 except Exception:134 try:135 self._stream.write(b"")136 except Exception:
486 unmodified lines
modified:src/click/_termui_impl.py+2 added-2 removed
249 unmodified lines
250 old_width = self.width251 self.width = 0252 clutter_length = term_len(self.format_progress_line())253 new_width = max(0, shutil.get_terminal_size().columns - clutter_length)254 if new_width < old_width:254 if new_width < old_width and self.max_width is not None:255 buf.append(BEFORE_BAR)256 buf.append(" " * self.max_width) # type: ignore256 buf.append(" " * self.max_width)257 self.max_width = new_width258 self.width = new_width259260 clear_width = self.width
502 unmodified lines