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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy