16 from itertools
import dropwhile
20 from .robotreader
import RobotReader
28 while i < len(row)
and row[i] !=
' ':
36 cells = RobotReader._check_deprecations(self, cells, path, line_number)
37 cells = [self.
_deprecate_quoting_deprecate_quoting(c, path, line_number)
for c
in cells]
42 if len(cell) > 1
and cell[0] == cell[-1] ==
'"':
43 LOGGER.warn(
"TSV file '%s' has quotes around cells which is "
44 "deprecated and must be fixed. Remove quotes "
45 "from '%s' on line %d."
46 % (path, cell, line_number))
47 return cell[1:-1].replace(
'""',
'"').strip()
51 data_cells = dropwhile(
lambda c:
not c, cells)
52 if not all(data_cells):
53 LOGGER.warn(
"TSV file '%s' has empty data cells which is "
54 "deprecated and must be fixed. Escape empty cells "
55 "on line %d with '${EMPTY}'." % (path, line_number))
def _strip_whitespace(cls, string)
def _deprecate_empty_data_cells(self, cells, path, line_number)
def _check_deprecations(self, cells, path, line_number)
def _deprecate_quoting(self, cell, path, line_number)