Skip to content

Commit 6043f1a

Browse files
committed
Update config
* Fix tests * Remove unused 'arch' option * Fixes deprecation warnings
1 parent 797ecf9 commit 6043f1a

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

api/config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,12 @@ def init():
6363
OPTIONS.add_option('arrayCheck', bool, False)
6464
OPTIONS.add_option('enableBreak', bool, False)
6565
OPTIONS.add_option('emitBackend', bool, False)
66-
OPTIONS.add_option('arch', str, 'zx48k')
6766
OPTIONS.add_option('__DEFINES', dict, {})
6867
OPTIONS.add_option('explicit', bool, False)
6968
OPTIONS.add_option('Sinclair', bool, False)
7069
OPTIONS.add_option('strict', bool, False) # True to force type checking
7170
OPTIONS.add_option('zxnext', bool, False) # True to enable ZX Next ASM opcodes
72-
OPTIONS.add_option('architecture', str) # Architecture
71+
OPTIONS.add_option('architecture', str, None) # Architecture
7372

7473

7574
init()

ast_/tree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def children(self):
9292

9393
@children.setter
9494
def children(self, value):
95-
assert isinstance(value, collections.Iterable)
95+
assert isinstance(value, collections.abc.Iterable)
9696
while len(self.children):
9797
self.children.pop()
9898

libzxbc/zxbparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def make_builtin(lineno, fname, operands, func=None, type_=None):
222222
assert isinstance(operands, Symbol) or isinstance(operands, tuple) or isinstance(operands, list)
223223
# TODO: In the future, builtin functions will be implemented in an external library, like POINT or ATTR
224224
__DEBUG__('Creating BUILTIN "{}"'.format(fname), 1)
225-
if not isinstance(operands, collections.Iterable):
225+
if not isinstance(operands, collections.abc.Iterable):
226226
operands = [operands]
227227
return symbols.BUILTIN.make_node(lineno, fname, func, type_, *operands)
228228

tests/api/test_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_init(self):
3636
self.assertEqual(config.OPTIONS.arrayCheck.value, False)
3737
self.assertEqual(config.OPTIONS.enableBreak.value, False)
3838
self.assertEqual(config.OPTIONS.emitBackend.value, False)
39-
self.assertEqual(config.OPTIONS.arch.value, 'zx48k')
39+
self.assertEqual(config.OPTIONS.architecture.value, None)
4040
# private options that cannot be accessed with #pragma
4141
self.assertEqual(config.OPTIONS.option('__DEFINES').value, {})
4242
self.assertEqual(config.OPTIONS.explicit.value, False)
@@ -49,7 +49,7 @@ def test_initted_values(self):
4949
'Sinclair',
5050
'StdErrFileName',
5151
'__DEFINES',
52-
'arch',
52+
'architecture',
5353
'arrayCheck',
5454
'array_base',
5555
'autorun',

0 commit comments

Comments
 (0)