Skip to content

Commit e779e2b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 30eb8df commit e779e2b

3 files changed

Lines changed: 13 additions & 11 deletions

File tree

part 9 - simple program/lesson/Token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Token(object):
2-
(INTEGER, PLUS, MINUS, MUL, DIV, LPAREN, RPAREN, ID, ASSIGN, BEGIN, END, SEMI, DOT, EOF) = (
2+
INTEGER, PLUS, MINUS, MUL, DIV, LPAREN, RPAREN, ID, ASSIGN, BEGIN, END, SEMI, DOT, EOF = (
33
'INTEGER',
44
'PLUS',
55
'MINUS',

part 9 - simple program/practice/Token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Token(object):
2-
(INTEGER, PLUS, MINUS, MUL, LPAREN, RPAREN, ID, ASSIGN, BEGIN, END, SEMI, DOT, EOF) = (
2+
INTEGER, PLUS, MINUS, MUL, LPAREN, RPAREN, ID, ASSIGN, BEGIN, END, SEMI, DOT, EOF = (
33
'INTEGER',
44
'PLUS',
55
'MINUS',

test/TestMethods.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,18 @@ def abstract_program_test(self, path, test_scopes=False):
102102
interpreter.interpret()
103103

104104
self.assertEqual(
105-
interpreter.GLOBAL_SCOPE
106-
if not test_scopes
107-
else [
108-
[
109-
scope.scope_name,
110-
scope.scope_level,
111-
scope.enclosing_scope.scope_name if scope.enclosing_scope else None,
105+
(
106+
interpreter.GLOBAL_SCOPE
107+
if not test_scopes
108+
else [
109+
[
110+
scope.scope_name,
111+
scope.scope_level,
112+
scope.enclosing_scope.scope_name if scope.enclosing_scope else None,
113+
]
114+
for scope in interpreter.semantic_analyzer.scopes
112115
]
113-
for scope in interpreter.semantic_analyzer.scopes
114-
],
116+
),
115117
global_scope,
116118
)
117119
self.delete(path)

0 commit comments

Comments
 (0)