black
black copied to clipboard
Improve call chain
Fixes #571
diff-shades results comparing this PR (8009888479e3c9834d12c15ce7c6f37ad13c34c8) to main (b7c3a9fedd4cfcc6a6a88aacc7b0f599b63d4716). The full diff is available in the logs under the "Generate HTML diff report" step.
╭──────────────────────────── Summary ─────────────────────────────╮
│ 17 projects & 554 files changed / 18 048 changes [+10 537/-7511] │
│ │
│ ... out of 2 543 597 lines, 12 138 files & 23 projects │
╰──────────────────────────────────────────────────────────────────╯
Differences found.
Seems like a lot of the diff in diff shades only have one method call. This in particular seems especially bad:
assert (
makeFY5253NearestEndMonthQuarter(
weekday=1, startingMonth=3, qtr_with_extra_week=3
- ).freqstr
+ )
+ .freqstr
== "REQ-N-MAR-TUE-3"
)
Looking at the diff-shades output, a lot of changes feel like mild negatives, e.g.
self.assertTrue(
- logger.messages[0].startswith(
+ logger.messages[0]
+ .startswith(
"route matched for url http://localhost:8080"
"/archives/action1/article1; "
"route_name: 'foo', "
"path_info: "
)
- assert repr_locals.lines[0].startswith(
- "x = <[NotImplementedError() raised in repr()] ObjWithErrorInRepr"
+ assert (
+ repr_locals.lines[0]
+ .startswith(
+ "x = <[NotImplementedError() raised in repr()]"
+ " ObjWithErrorInRepr"
+ )
)