This commit is contained in:
Will McGugan 2020-04-19 14:40:22 +01:00
parent b4e860b035
commit 958638c180
2 changed files with 8 additions and 2 deletions

View file

@ -5,6 +5,12 @@ Rich is a Python library for writing *rich* text (with color and formatting) to
Use Rich to make command line applications more visually appealing and present data in a more readable way. Rich can also be a useful debugging aid by pretty printing and syntax highlighting data structures.
Requirements
------------
Rich works with OSX, Linux and Windows.
Rich requires Python 3.6.1 and above. Note that Python 3.6.0 is *not* supported due to lack of support for methods on NamedTuples.
Installation
------------

View file

@ -1,12 +1,12 @@
from functools import lru_cache
from itertools import takewhile
from typing import List, Tuple
from typing import Dict, List, Tuple
from ._cell_widths import CELL_WIDTHS
from ._lru_cache import LRUCache
def cell_len(text: str, _cache: LRUCache[str, int] = LRUCache(1024 * 4)) -> int:
def cell_len(text: str, _cache: Dict[str, int] = LRUCache(1024 * 4)) -> int:
"""Get the number of cells required to display text.
Args: