Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit11b5723

Browse files
committed
Simplify check_exercise call chain
1 parent4a33f3d commit11b5723

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

‎backend/main/text.py‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,6 @@ def check_with_messages(self):
230230
defcheck(self)->Union[bool,dict]:
231231
raiseNotImplementedError
232232

233-
defcheck_exercise(self,*args,**kwargs):
234-
ifself.code_source!="shell":
235-
returncheck_exercise(self.input,*args,**kwargs)
236-
237233
@property
238234
deftree(self):
239235
returnast.parse(self.input)
@@ -267,12 +263,14 @@ def input_matches(self, pattern, remove_spaces=True):
267263
classExerciseStep(Step):
268264

269265
defcheck(self):
270-
returnself.check_exercise(
271-
self.solution,
272-
self.test_exercise,
273-
self.generate_inputs,
274-
functionise=True,
275-
)
266+
ifself.code_source!="shell":
267+
returncheck_exercise(
268+
self.input,
269+
self.solution,
270+
self.test_exercise,
271+
self.generate_inputs,
272+
functionise=True,
273+
)
276274

277275
@abstractmethod
278276
defsolution(self,*args,**kwargs):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp