Skip to content

Commit 53e1ae6

Browse files
committed
Fix optional type hint
typing.OrderedDict wasn't added until Python 3.7.2; so replace with Dict.
1 parent 0873b4d commit 53e1ae6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd2/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import threading
1212
import unicodedata
1313
from enum import Enum
14-
from typing import Any, Callable, Iterable, List, OrderedDict, Optional, TextIO, Union
14+
from typing import Any, Callable, Dict, Iterable, List, Optional, TextIO, Union
1515

1616
from . import constants
1717

@@ -914,7 +914,7 @@ def truncate_line(line: str, max_width: int, *, tab_width: int = 4) -> str:
914914
return truncated_buf.getvalue()
915915

916916

917-
def get_styles_in_text(text: str) -> OrderedDict[int, str]:
917+
def get_styles_in_text(text: str) -> Dict[int, str]:
918918
"""
919919
Return an OrderedDict containing all ANSI style sequences found in a string
920920

0 commit comments

Comments
 (0)