Skip to content

Commit

Permalink
flake8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiksharma98 committed Apr 20, 2021
1 parent bf0491c commit 85e921c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions course/page/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def check_timeout():
while True:
try:
connection = http_client.HTTPConnection(connect_host_ip, port)
print('attempting connection',connect_host_ip,port)
print("attempting connection", connect_host_ip, port)

connection.request("GET", "/ping") # XXX here's the trouble

Expand Down Expand Up @@ -722,13 +722,16 @@ def get_test_code(self):
if correct_code is None:
correct_code = ""

from .code_run_backend_py \
import substitute_correct_code_into_test_code


if self.page_desc.type in [
"OctaveCodeQuestion"]:
from .code_run_backend_octave \
import substitute_correct_code_into_test_code
else:
from .code_run_backend_py \
import substitute_correct_code_into_test_code

return substitute_correct_code_into_test_code(test_code, correct_code)

@staticmethod
Expand Down
6 changes: 3 additions & 3 deletions course/page/code_run_backend_octave.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,19 +219,19 @@ def output_html(s):
result["result"] = "success"
return

'''
"""
user_ctx = {}
if hasattr(run_req, "names_for_user"): #XXX unused for Octave context currently
for name in run_req.names_for_user:
if name not in maint_ctx:
result["result"] = "setup_error"
result["message"] = "Setup code did not define '%s'." % name
result["message"] = "Setup code did not define \'%s\'." % name
user_ctx[name] = maint_ctx[name]
from copy import deepcopy
user_ctx = deepcopy(user_ctx)
'''
"""

try:
#user_ctx["_MODULE_SOURCE_CODE"] = run_req.user_code
Expand Down

0 comments on commit 85e921c

Please sign in to comment.