(self, diff: "ItemDiff")
| 1218 | return "" |
| 1219 | |
| 1220 | def format_content(self, diff: "ItemDiff"): |
| 1221 | change = diff.content() |
| 1222 | if change: |
| 1223 | if change.diff_type == "added": |
| 1224 | return "{}: {:>20}".format(change.diff_type, format_file_size(change.diff_data["added"])) |
| 1225 | if change.diff_type == "removed": |
| 1226 | return "{}: {:>18}".format(change.diff_type, format_file_size(change.diff_data["removed"])) |
| 1227 | if "added" not in change.diff_data and "removed" not in change.diff_data: |
| 1228 | return "modified: (can't get size)" |
| 1229 | return "{}: {:>8} {:>8}".format( |
| 1230 | change.diff_type, |
| 1231 | format_file_size(change.diff_data["added"], precision=1, sign=True), |
| 1232 | format_file_size(-change.diff_data["removed"], precision=1, sign=True), |
| 1233 | ) |
| 1234 | return "" |
| 1235 | |
| 1236 | def format_time(self, key, diff: "ItemDiff"): |
| 1237 | change = diff.changes().get(key) |
nothing calls this directly
no test coverage detected