Removes ContextDecorator (unnecessary)

This commit is contained in:
Niru Maheswaranathan
2017-05-23 13:59:11 -07:00
parent 26dd4d81f0
commit 9ba26df887

View File

@@ -14,7 +14,6 @@ from __future__ import print_function, unicode_literals
from six import string_types
from collections import namedtuple
from numbers import Number
from contextlib import ContextDecorator
import sys
import re
import numpy as np
@@ -69,10 +68,10 @@ WIDTH = 11
FMT = '5g'
class Table(ContextDecorator):
class Table:
def __init__(self, headers, width=WIDTH, style=STYLE, add_hr=True):
self.headers = header(headers, width=WIDTH, style=STYLE, add_hr=add_hr)
self.bottom = bottom(len(headers), width=WIDTH, style=STYLE)
self.headers = header(headers, width=width, style=style, add_hr=add_hr)
self.bottom = bottom(len(headers), width=width, style=style)
def __call__(self, data):
print(row(data), flush=True)