Skip to content
Myr

Properly lazily import shutil

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

authored by Ofek Lev · committed by Ofek Lev · parent 4f936ac · Browse files · 1 file+2 added−2 removed
This commit

State

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

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:src/click/formatting.py+2 added-2 removed
117 unmodified lines
118 indent_increment: int = 2,119 width: int | None = None,120 max_width: int | None = None,121 ) -> None:122 import shutil123122 self.indent_increment = indent_increment123 if max_width is None:124 max_width = 80125 if width is None:126 import shutil127128 width = FORCED_WIDTH129 if width is None:130 width = max(min(shutil.get_terminal_size().columns, max_width) - 2, 50)131 self.width = width
170 unmodified lines