Skip to content

Commit 50878d0

Browse files
committed
Fix filename argument being positional-only instead of positional-or-keyword as intended.
1 parent 51a2033 commit 50878d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shared-bindings/supervisor/__init__.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ STATIC mp_obj_t supervisor_set_next_stack_limit(mp_obj_t size_obj) {
110110
}
111111
MP_DEFINE_CONST_FUN_OBJ_1(supervisor_set_next_stack_limit_obj, supervisor_set_next_stack_limit);
112112

113-
//| def set_next_code_file(filename: Optional[str], /, *, reload_on_success : bool = False, reload_on_error: bool = False, sticky_on_success: bool = False, sticky_on_error: bool = False, sticky_on_reload: bool = False) -> None:
113+
//| def set_next_code_file(filename: Optional[str], *, reload_on_success : bool = False, reload_on_error: bool = False, sticky_on_success: bool = False, sticky_on_error: bool = False, sticky_on_reload: bool = False) -> None:
114114
//| """Set what file to run on the next vm run.
115115
//|
116116
//| When not ``None``, the given ``filename`` is inserted at the front of the usual ['code.py',
@@ -178,7 +178,7 @@ STATIC mp_obj_t supervisor_set_next_code_file(size_t n_args, const mp_obj_t *pos
178178
MP_STATE_VM(supervisor_next_code) = mp_obj_new_tuple(MP_ARRAY_SIZE(items), items);
179179
return mp_const_none;
180180
}
181-
MP_DEFINE_CONST_FUN_OBJ_KW(supervisor_set_next_code_file_obj, 1, supervisor_set_next_code_file);
181+
MP_DEFINE_CONST_FUN_OBJ_KW(supervisor_set_next_code_file_obj, 0, supervisor_set_next_code_file);
182182

183183
STATIC const mp_rom_map_elem_t supervisor_module_globals_table[] = {
184184
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_supervisor) },

0 commit comments

Comments
 (0)