thoward27 / grade

Re-defined variable from outer scope PYL-W0621
Anti-pattern
Major
4 years ago4 years old
Redefining name 'results' from outer scope (line 144)
106        [pipeline(testcase)() for testcase in testcases]
107
108        # Or, you can also award partial credit for each testcase:
109        results = PartialCredit(map(pipeline, testcases), 10)()110        self.score = results.score
111
112    # Any output written to stdout or stderr is captured and included
Redefining name 'results' from outer scope (line 144)
128
129        self.weight = 10
130
131        results = Pipeline(Run(["echo", "hello world"]), AssertExitSuccess())()132        # Here we set the leaderboard score as the duration.
133        self.leaderboardScore = results.duration
134