black icon indicating copy to clipboard operation
black copied to clipboard

Improve call chain

Open Booome opened this issue 1 year ago • 3 comments

Fixes #571

Booome avatar Jan 13 '24 14:01 Booome

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.

What is this? | Workflow run | diff-shades documentation

github-actions[bot] avatar Jan 13 '24 16:01 github-actions[bot]

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"
     )

tungol avatar Jan 14 '24 06:01 tungol

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"
+            )
         )

JelleZijlstra avatar Jan 15 '24 17:01 JelleZijlstra