Small fixes#329
Conversation
WhyNotHugo
left a comment
There was a problem hiding this comment.
Sorry for the slow review; I kinda missed the notification email! 😓
LGTM, I'd just apply some minor changes to this.
Thanks!
|
|
||
| return self._columnize_list(label, lines) | ||
|
|
||
| def _columnize_list(self, label, lst): |
There was a problem hiding this comment.
I'd move this function's logic inside _columnize_text, since it's not really something we're reusing.
There was a problem hiding this comment.
I externalized this part on purpose, because we will use it for the categories. (see PR #323)
| if value is None: | ||
| v = '' | ||
| elif not isinstance(value, str): | ||
| raise ValueError("Got {0} for {1} where str was expected" |
There was a problem hiding this comment.
These validations are kinda unreachable, and are mostly here to prevent programming errors. Because of that, I'd much prefer to use assert, since otherwise these is normally-unreachable code.
There was a problem hiding this comment.
Good point, I'll change this part.
There was a problem hiding this comment.
Done, changed it into assertions.
|
Just realized that the (now gone) fourth commit fixes something that is already taken care of in #332. I guess we should wait until this is merged and I'll rebase to the new master. |
WhyNotHugo
left a comment
There was a problem hiding this comment.
LGTM. I'll merge this once master is fixed, which I'll try to do very soon!
|
Can you merge or rebase master into your branch, so that CI passes? Thanks! |
Done. |
|
Thanks! Sorry to keep you waiting so long with a broken |
No worries, thanks for merging! |
Small fixes to make life easier:
Todomodel checks types in__setattr__Formatterdistinguishes text and lists in_columnize_columize_*(Work towards solving #323)