Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __get_cell_style(self, col):
try:
import xlwt
except ImportError:
warnings.warn(import_error_msg_template.format("excel"))
raise
if col in self.__col_style_table:
return self.__col_style_table.get(col)
try:
col_dp = self._column_dp_list[col]
except KeyError:
return {}
if col_dp.typecode not in [typepy.Typecode.REAL_NUMBER]:
raise ValueError()
if not Integer(col_dp.minmax_decimal_places.max_value).is_type():
raise ValueError()
def _get_tags_module():
try:
from dominate import tags
return tags
except ImportError:
warnings.warn(import_error_msg_template.format("html"))
raise
def open(self, file_path):
try:
import xlwt
except ImportError:
warnings.warn(import_error_msg_template.format("excel"))
raise
self._workbook = xlwt.Workbook()