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

Commit8829a23

Browse files
authored
Merge pull requestalexmojaki#275 from alexmojaki/stack-data-fix
Little fixes
2 parents9ab212a +9940f51 commit8829a23

File tree

5 files changed

+40
-29
lines changed

5 files changed

+40
-29
lines changed

‎core/checker.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ def non_str_input(self):
4747
pass# wait for the interrupt
4848

4949

50-
FullRunner.run=catch_internal_errors(FullRunner.run)
51-
52-
5350
runner=FullRunner()
5451

5552

‎core/runner/friendly_traceback.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
fromcoreimporttranslationast
55

6-
sys.last_type=sys.last_value=sys.last_traceback=None
6+
forattrin"type value traceback".split():
7+
sys.__dict__.pop("last_"+attr,None)
78

89
fromfriendly_traceback.coreimportFriendlyTraceback
910

‎poetry.lock‎

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎tests/golden_files/es/test_transcript.json‎

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"passed":false,
4444
"result": [
4545
{
46-
"text":" 3 x 4\n ^\nSyntaxError: invalid syntax\nat line 1\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nCurrently, I cannot guess the likely cause of this error.\nTry to examine closely the line indicated as well as the line\nimmediately above to see if you can identify some misspelled\nword, or missing symbols, like (, ), [, ], :, etc.\n\nUnless your code uses type annotations, which are beyond our scope,\nif you think that this is something which should be handled\nby friendly, please report this case to\nhttps://github.com/aroberge/friendly/issues\n\n\n\n",
46+
"text":" 3 x 4\n ^\nSyntaxError: invalid syntax\nen la l\u00ednea 1\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nCurrently, I cannot guess the likely cause of this error.\nTry to examine closely the line indicated as well as the line\nimmediately above to see if you can identify some misspelled\nword, or missing symbols, like (, ), [, ], :, etc.\n\nUnless your code uses type annotations, which are beyond our scope,\nif you think that this is something which should be handled\nby friendly, please report this case to\nhttps://github.com/aroberge/friendly/issues\n\n\n\n",
4747
"type":"syntax_error"
4848
}
4949
]
@@ -563,7 +563,7 @@
563563
"passed":true,
564564
"result": [
565565
{
566-
"text":" print(caracter)\n ^\nIndentationError: expected an indented block\nat line 2\n\nAn `IndentationError` occurs when a given line of code is\nnot indented (aligned vertically with other lines) as expected.\n\nLine `2` identified above was expected to begin a new indented block.\n\n\n",
566+
"text":" print(caracter)\n ^\nIndentationError: expected an indented block\nen la l\u00ednea 2\n\nAn `IndentationError` occurs when a given line of code is\nnot indented (aligned vertically with other lines) as expected.\n\nLine `2` identified above was expected to begin a new indented block.\n\n\n",
567567
"type":"syntax_error"
568568
}
569569
]
@@ -624,7 +624,7 @@
624624
"passed":true,
625625
"result": [
626626
{
627-
"text":" print('---')\n ^\nIndentationError: unindent does not match any outer indentation level\nat line 3\n\nAn `IndentationError` occurs when a given line of code is\nnot indented (aligned vertically with other lines) as expected.\n\nLine `3` identified above is less indented than expected.\n\n\n",
627+
"text":" print('---')\n ^\nIndentationError: unindent does not match any outer indentation level\nen la l\u00ednea 3\n\nAn `IndentationError` occurs when a given line of code is\nnot indented (aligned vertically with other lines) as expected.\n\nLine `3` identified above is less indented than expected.\n\n\n",
628628
"type":"syntax_error"
629629
}
630630
]
@@ -1783,7 +1783,7 @@
17831783
"passed":true,
17841784
"result": [
17851785
{
1786-
"text":" print(1 + 2 = 3)\n ^\nSyntaxError: expression cannot contain assignment, perhaps you meant\"==\"?\nat line 1\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nYou likely called a function with a named argument:\n\n a_function(invalid=something)\n\nwhere `invalid` is not a valid variable name in Python\neither because it starts with a number, or is a string,\nor contains a period, etc.\n\n\n",
1786+
"text":" print(1 + 2 = 3)\n ^\nSyntaxError: expression cannot contain assignment, perhaps you meant\"==\"?\nen la l\u00ednea 1\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nYou likely called a function with a named argument:\n\n a_function(invalid=something)\n\nwhere `invalid` is not a valid variable name in Python\neither because it starts with a number, or is a string,\nor contains a period, etc.\n\n\n",
17871787
"type":"syntax_error"
17881788
}
17891789
]
@@ -1794,13 +1794,13 @@
17941794
"page":"El operador de igualdad",
17951795
"program": [
17961796
"nombre = 'kesha'",
1797-
"juevo_nuevo = ''",
1797+
"juego_nuevo = ''",
17981798
"for c in nombre:",
17991799
" if c == 's':",
18001800
" c = '$'",
1801-
"juevo_nuevo += c",
1801+
"juego_nuevo += c",
18021802
"",
1803-
"print(juevo_nuevo)"
1803+
"print(juego_nuevo)"
18041804
],
18051805
"response": {
18061806
"message":"",
@@ -1816,32 +1816,32 @@
18161816
},
18171817
{
18181818
"get_solution": [
1819-
"juevo_nuevo = ''",
1819+
"juego_nuevo = ''",
18201820
"for c in nombre:",
18211821
" if c == 'e':",
18221822
" c = '3'",
18231823
" if c == 's':",
18241824
" c = '$'",
18251825
" if c == 'a':",
18261826
" c = '@'",
1827-
"juevo_nuevo += c",
1827+
"juego_nuevo += c",
18281828
"",
1829-
"print(juevo_nuevo)"
1829+
"print(juego_nuevo)"
18301830
],
18311831
"page":"El operador de igualdad",
18321832
"program": [
18331833
"nombre = 'kesha'",
1834-
"juevo_nuevo = ''",
1834+
"juego_nuevo = ''",
18351835
"for c in nombre:",
18361836
" if c == 'e':",
18371837
" c = '3'",
18381838
" if c == 's':",
18391839
" c = '$'",
18401840
" if c == 'a':",
18411841
" c = '@'",
1842-
"juevo_nuevo += c",
1842+
"juego_nuevo += c",
18431843
"",
1844-
"print(juevo_nuevo)"
1844+
"print(juego_nuevo)"
18451845
],
18461846
"response": {
18471847
"message":"",
@@ -3777,7 +3777,7 @@
37773777
"passed":true,
37783778
"result": [
37793779
{
3780-
"text":" print('Alice's Diner')\n ^\nSyntaxError: invalid syntax\nat line 1\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nThere appears to be a Python identifier (variable name)\nimmediately following a string.\nI suspect that you were trying to use a quote inside a string\nthat was enclosed in quotes of the same kind.\n\n\n",
3780+
"text":" print('Alice's Diner')\n ^\nSyntaxError: invalid syntax\nen la l\u00ednea 1\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nThere appears to be a Python identifier (variable name)\nimmediately following a string.\nI suspect that you were trying to use a quote inside a string\nthat was enclosed in quotes of the same kind.\n\n\n",
37813781
"type":"syntax_error"
37823782
}
37833783
]
@@ -4227,7 +4227,7 @@
42274227
"passed":false,
42284228
"result": [
42294229
{
4230-
"text":" 3 x 4\n ^\nSyntaxError: invalid syntax\nat line 2\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nCurrently, I cannot guess the likely cause of this error.\nTry to examine closely the line indicated as well as the line\nimmediately above to see if you can identify some misspelled\nword, or missing symbols, like (, ), [, ], :, etc.\n\nUnless your code uses type annotations, which are beyond our scope,\nif you think that this is something which should be handled\nby friendly, please report this case to\nhttps://github.com/aroberge/friendly/issues\n\n\n\n",
4230+
"text":" 3 x 4\n ^\nSyntaxError: invalid syntax\nen la l\u00ednea 2\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nCurrently, I cannot guess the likely cause of this error.\nTry to examine closely the line indicated as well as the line\nimmediately above to see if you can identify some misspelled\nword, or missing symbols, like (, ), [, ], :, etc.\n\nUnless your code uses type annotations, which are beyond our scope,\nif you think that this is something which should be handled\nby friendly, please report this case to\nhttps://github.com/aroberge/friendly/issues\n\n\n\n",
42314231
"type":"syntax_error"
42324232
}
42334233
]
@@ -4383,7 +4383,7 @@
43834383
"step":"player_vs_player_bonus"
43844384
},
43854385
{
4386-
"page":"Comprensi\u00f3n de programas conBird's Eye",
4386+
"page":"Comprensi\u00f3n de programas con<code>birdseye</code>",
43874387
"program": [
43884388
"a = 2",
43894389
"b = 3",
@@ -4404,7 +4404,7 @@
44044404
"step":"first_birdseye_example"
44054405
},
44064406
{
4407-
"page":"Comprensi\u00f3n de programas conBird's Eye",
4407+
"page":"Comprensi\u00f3n de programas con<code>birdseye</code>",
44084408
"program": [
44094409
"palabra = 'Sorprendente'",
44104410
"vocales = []",
@@ -5840,7 +5840,7 @@
58405840
"passed":true,
58415841
"result": [
58425842
{
5843-
"text":" es_amigo = nombre ==\"Alicia\" or\n ^\nSyntaxError: invalid syntax\nat line 1\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nThe Python keyword `or` can only be used for boolean expressions.\nPerhaps you meant to write\n\n`es_amigo = nombre ==\"Alicia\" ,`\n\n\n",
5843+
"text":" es_amigo = nombre ==\"Alicia\" or\n ^\nSyntaxError: invalid syntax\nen la l\u00ednea 1\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nThe Python keyword `or` can only be used for boolean expressions.\nPerhaps you meant to write\n\n`es_amigo = nombre ==\"Alicia\" ,`\n\n\n",
58445844
"type":"syntax_error"
58455845
}
58465846
]
@@ -6226,7 +6226,7 @@
62266226
"passed":true,
62276227
"result": [
62286228
{
6229-
"text":"\"XOX\n ^\nSyntaxError: EOL while scanning string literal\nat line 7\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nYou started writing a string with a single or double quote\nbut never ended the string with another quote on that line.\n\n\n",
6229+
"text":"\"XOX\n ^\nSyntaxError: EOL while scanning string literal\nen la l\u00ednea 7\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nYou started writing a string with a single or double quote\nbut never ended the string with another quote on that line.\n\n\n",
62306230
"type":"syntax_error"
62316231
}
62326232
]
@@ -6833,6 +6833,19 @@
68336833
},
68346834
"step":"naive_make_board"
68356835
},
6836+
{
6837+
"page":"Construyendo el Tablero",
6838+
"program": [
6839+
"pass",
6840+
"def crear_tablero(tamano): return [[' '] * tamano] * tamano"
6841+
],
6842+
"response": {
6843+
"message":"<p>Las sublistas en el resultado no son objetos separados.</p>",
6844+
"passed":false,
6845+
"result": []
6846+
},
6847+
"step":"fix_make_board"
6848+
},
68366849
{
68376850
"get_solution": [
68386851
"def crear_tablero(tamano):",
6.06 KB
Binary file not shown.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp