Skip to content

Conversation

@bbatha
Copy link
Contributor

@bbatha bbatha commented Jun 3, 2020

No description provided.

@bbatha bbatha requested a review from BartoszCki June 8, 2020 17:54
@bbatha
Copy link
Contributor Author

bbatha commented Jun 8, 2020

@BartoszCki ready for re-review

return table_string


class NotebookLogsCommand(LogsCommandMixin, BaseNotebookCommand):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again: Why is this class moved to the end of the file?

Comment on lines +210 to +228

def _make_table(self, logs, id):
table_title = "%s %s logs" % (self.ENTITY, id)
table_data = [("LINE", "MESSAGE")]
table = terminaltables.AsciiTable(table_data, title=table_title)

for log in logs:
table_data.append(self._format_row(log))

return table.table

def _get_log_row_string(self, id, log):
log_msg = "{}\t{}".format(*self._format_row(log))
return log_msg

@staticmethod
def _format_row(log_row):
return (style(fg="red", text=str(log_row.line)),
log_row.message)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this moved to the end of the class? You could have implemented those methods without moving them around.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing changes this way makes it harder to read git file history

@bbatha bbatha merged commit 210f4c6 into master Jun 10, 2020
@bbatha bbatha deleted the feat-notebook-logs-PS-13712 branch June 10, 2020 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants