summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cliff/formatters/table.py13
-rw-r--r--doc/source/user/list_commands.rst2
-rw-r--r--doc/source/user/show_commands.rst2
-rw-r--r--requirements.txt4
4 files changed, 7 insertions, 14 deletions
diff --git a/cliff/formatters/table.py b/cliff/formatters/table.py
index 397777c..df0b087 100644
--- a/cliff/formatters/table.py
+++ b/cliff/formatters/table.py
@@ -10,12 +10,12 @@
# License for the specific language governing permissions and limitations
# under the License.
-"""Output formatters using prettytable.
-"""
+"""Output formatters using prettytable."""
-import prettytable
import os
+import prettytable
+
from cliff import utils
from . import base
from cliff import columns
@@ -39,10 +39,6 @@ class TableFormatter(base.ListFormatter, base.SingleFormatter):
str: 'l',
float: 'r',
}
- try:
- ALIGNMENTS[unicode] = 'l'
- except NameError:
- pass
def add_argument_group(self, parser):
group = parser.add_argument_group('table formatter')
@@ -175,9 +171,6 @@ class TableFormatter(base.ListFormatter, base.SingleFormatter):
@staticmethod
def _assign_max_widths(stdout, x, max_width, min_width=0, fit_width=False):
- if min_width:
- x.min_width = min_width
-
if max_width > 0:
term_width = max_width
elif not fit_width:
diff --git a/doc/source/user/list_commands.rst b/doc/source/user/list_commands.rst
index d682ff9..5a28c7b 100644
--- a/doc/source/user/list_commands.rst
+++ b/doc/source/user/list_commands.rst
@@ -49,7 +49,7 @@ table
The ``table`` formatter uses PrettyTable_ to produce output formatted
for human consumption.
-.. _PrettyTable: http://code.google.com/p/prettytable/
+.. _PrettyTable: https://pypi.org/project/prettytable/
::
diff --git a/doc/source/user/show_commands.rst b/doc/source/user/show_commands.rst
index 8751285..ccbb668 100644
--- a/doc/source/user/show_commands.rst
+++ b/doc/source/user/show_commands.rst
@@ -34,7 +34,7 @@ table
The ``table`` formatter uses PrettyTable_ to produce output
formatted for human consumption. This is the default formatter.
-.. _PrettyTable: http://code.google.com/p/prettytable/
+.. _PrettyTable: https://pypi.org/project/prettytable
::
diff --git a/requirements.txt b/requirements.txt
index cb74608..774d9d2 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,8 +2,8 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr!=2.1.0,>=2.0.0 # Apache-2.0
-cmd2>=0.8.0,!=0.8.3 # MIT
-PrettyTable<0.8,>=0.7.2 # BSD
+cmd2>=1.0.0 # MIT
+PrettyTable>=0.7.2 # BSD
pyparsing>=2.1.0 # MIT
stevedore>=2.0.1 # Apache-2.0
PyYAML>=3.12 # MIT