diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-04-10 00:32:26 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-10 00:32:26 +0900 |
commit | fe6d95e4294f47d61f1a04a1f8c6567c9802f504 (patch) | |
tree | 33a7143bf1dcf60830c2e1fcd4b396175af45e64 /sphinx/util/console.py | |
parent | 7327e56dff865d4766c43d46405ae827e10fd6c3 (diff) | |
parent | ce5d66e618c111b115a9bb7b1401a26483fcfa8f (diff) | |
download | sphinx-git-fe6d95e4294f47d61f1a04a1f8c6567c9802f504.tar.gz |
Merge branch 'master' into patch-1
Diffstat (limited to 'sphinx/util/console.py')
-rw-r--r-- | sphinx/util/console.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/util/console.py b/sphinx/util/console.py index 3ea5b9573..0c8008371 100644 --- a/sphinx/util/console.py +++ b/sphinx/util/console.py @@ -11,7 +11,7 @@ import os import re import sys -from typing import Dict +from typing import Dict, Pattern try: # check if colorama is installed to support color on Windows @@ -20,8 +20,8 @@ except ImportError: colorama = None -_ansi_re = re.compile('\x1b\\[(\\d\\d;){0,2}\\d\\dm') -codes = {} # type: Dict[str, str] +_ansi_re: Pattern = re.compile('\x1b\\[(\\d\\d;){0,2}\\d\\dm') +codes: Dict[str, str] = {} def terminal_safe(s: str) -> str: @@ -44,7 +44,7 @@ def get_terminal_width() -> int: return terminal_width -_tw = get_terminal_width() +_tw: int = get_terminal_width() def term_width_line(text: str) -> str: |