Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
change `fill` to `textwrap.fill`
  • Loading branch information
iamalisalehi authored May 17, 2024
1 parent 240caf2 commit c52f55b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pick/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import curses
from textwrap import fill
import textwrap
from collections import namedtuple
from dataclasses import dataclass, field
from typing import Any, Generic, List, Optional, Sequence, Tuple, TypeVar, Union
Expand Down Expand Up @@ -151,7 +151,7 @@ def draw(self, screen: "curses._CursesWindow") -> None:

option = self.options[self.index]
if isinstance(option, Option) and option.description is not None:
description_lines = fill(option.description, max_x // 2 - 2).split('\n')
description_lines = textwrap.fill(option.description, max_x // 2 - 2).split('\n')

for i, line in enumerate(description_lines):
screen.addnstr(i + 3, max_x // 2, line, max_x - 2)
Expand Down

0 comments on commit c52f55b

Please sign in to comment.