diff --git a/src/table.py b/src/table.py index 4cd6d97..d2563ed 100644 --- a/src/table.py +++ b/src/table.py @@ -104,14 +104,11 @@ def __check_superrow(self, row): """ cleaned_row = set( - [i for i in row if (str(i) != "") & (str(i) != "\n") & (str(i) != "None")] + i for i in row if (str(i) != "") & (str(i) != "\n") & (str(i) != "None") ) - if len(cleaned_row) == 1 and bool( + return len(cleaned_row) == 1 and bool( re.match("[a-zA-Z]", next(iter(cleaned_row))) - ): - return True - else: - return False + ) def __find_format(self, header): """