Skip to content

Commit 146be27

Browse files
committed
Avoid unsafe default argument
1 parent ac473c3 commit 146be27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bpython/test/test_repl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
def setup_config(conf):
2323
config_struct = config.Struct()
2424
config.loadini(config_struct, TEST_CONFIG)
25-
if 'autocomplete_mode' in conf:
25+
if conf is not None and 'autocomplete_mode' in conf:
2626
config_struct.autocomplete_mode = conf['autocomplete_mode']
2727
return config_struct
2828

@@ -37,7 +37,7 @@ def reset(self):
3737

3838

3939
class FakeRepl(repl.Repl):
40-
def __init__(self, conf={}):
40+
def __init__(self, conf=None):
4141
repl.Repl.__init__(self, repl.Interpreter(), setup_config(conf))
4242
self.current_line = ""
4343
self.cursor_offset = 0

0 commit comments

Comments
 (0)