From 7a072479743dcbc561fb6c94d436dc5132f2a4bc Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 9 Aug 2022 14:37:52 -0700 Subject: [PATCH] Remove all kwarg from ScanEntry.matches Fixes #3007 --- shared-bindings/_bleio/ScanEntry.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/shared-bindings/_bleio/ScanEntry.c b/shared-bindings/_bleio/ScanEntry.c index d9434f39cf..a5009088a5 100644 --- a/shared-bindings/_bleio/ScanEntry.c +++ b/shared-bindings/_bleio/ScanEntry.c @@ -48,25 +48,22 @@ //| def matches(self, prefixes: ScanEntry, *, match_all: bool = True) -> bool: //| """Returns True if the ScanEntry matches all prefixes when ``match_all`` is True. This is stricter //| than the scan filtering which accepts any advertisements that match any of the prefixes -//| where ``match_all`` is False. -//| -//| ``all`` also works for ``match_all`` but will be removed in CircuitPython 8.""" +//| where ``match_all`` is False.""" //| ... //| STATIC mp_obj_t bleio_scanentry_matches(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { bleio_scanentry_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); - enum { ARG_prefixes, ARG_all, ARG_match_all }; + enum { ARG_prefixes, ARG_match_all }; static const mp_arg_t allowed_args[] = { { MP_QSTR_prefixes, MP_ARG_OBJ | MP_ARG_REQUIRED }, - { MP_QSTR_all, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = true} }, { MP_QSTR_match_all, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = true} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - bool match_all = args[ARG_all].u_bool && args[ARG_match_all].u_bool; + bool match_all = args[ARG_match_all].u_bool; mp_buffer_info_t bufinfo; mp_get_buffer_raise(args[ARG_prefixes].u_obj, &bufinfo, MP_BUFFER_READ);