Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def format(self):
# don't use default because default should be const
return Utility.lazy_get(self, '_format', Format.Format())
def __or__(self, other):
return Format(
format=Utility.nonboolean_or(self.format, other.format, None))
def set_cell_value(self, x, y, value):
if DataTypes.get_type(value) == DataTypes.DATE:
self.get_cell_style(x, y).format = Format.Format('yyyy-mm-dd')
if x < len(self._dense_cells) and y < len(self._dense_cells[x]):
self._dense_cells[x][y] = value
else:
self._sparse_cells[x][y] = value
self._columns = max(self._columns, y)
def __xor__(self, other):
return Format(
format=Utility.nonboolean_xor(self.format, other.format, None))
def __and__(self, other):
return Format(
format=Utility.nonboolean_and(self.format, other.format, None))
def is_default(self):
return self == Format()