summaryrefslogtreecommitdiff
path: root/cmd2/table_creator.py
diff options
context:
space:
mode:
Diffstat (limited to 'cmd2/table_creator.py')
-rw-r--r--cmd2/table_creator.py21
1 files changed, 1 insertions, 20 deletions
diff --git a/cmd2/table_creator.py b/cmd2/table_creator.py
index 3a3892b8..8dcd80f0 100644
--- a/cmd2/table_creator.py
+++ b/cmd2/table_creator.py
@@ -16,6 +16,7 @@ from enum import (
)
from typing import (
Any,
+ Deque,
Optional,
Sequence,
Tuple,
@@ -32,26 +33,6 @@ from . import (
utils,
)
-# This is needed for compatibility with early versions of Python 3.5 prior to 3.5.4
-try:
- from typing import (
- Deque,
- )
-except ImportError: # pragma: no cover
- import typing
-
- # The following copied from the implementation of Deque in Python 3.5.4
- # noinspection PyProtectedMember, PyUnresolvedReferences
- class Deque(deque, typing.MutableSequence[typing.T]):
- __slots__ = ()
- __extra__ = deque
-
- def __new__(cls, *args, **kwds):
- if typing._geqv(cls, Deque):
- raise TypeError('Type Deque cannot be instantiated; use deque() instead')
- return typing._generic_new(deque, cls, *args, **kwds)
-
-
# Constants
EMPTY = ''
SPACE = ' '