Skip to content

Commit e50fc23

Browse files
authored
Merge pull request #6730 from tannewt/remove_scanentry_all
Remove all kwarg from ScanEntry.matches
2 parents 138c92f + 7a07247 commit e50fc23

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

shared-bindings/_bleio/ScanEntry.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,22 @@
4848
//| def matches(self, prefixes: ScanEntry, *, match_all: bool = True) -> bool:
4949
//| """Returns True if the ScanEntry matches all prefixes when ``match_all`` is True. This is stricter
5050
//| than the scan filtering which accepts any advertisements that match any of the prefixes
51-
//| where ``match_all`` is False.
52-
//|
53-
//| ``all`` also works for ``match_all`` but will be removed in CircuitPython 8."""
51+
//| where ``match_all`` is False."""
5452
//| ...
5553
//|
5654
STATIC mp_obj_t bleio_scanentry_matches(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
5755
bleio_scanentry_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]);
5856

59-
enum { ARG_prefixes, ARG_all, ARG_match_all };
57+
enum { ARG_prefixes, ARG_match_all };
6058
static const mp_arg_t allowed_args[] = {
6159
{ MP_QSTR_prefixes, MP_ARG_OBJ | MP_ARG_REQUIRED },
62-
{ MP_QSTR_all, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = true} },
6360
{ MP_QSTR_match_all, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = true} },
6461
};
6562

6663
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
6764
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
6865

69-
bool match_all = args[ARG_all].u_bool && args[ARG_match_all].u_bool;
66+
bool match_all = args[ARG_match_all].u_bool;
7067

7168
mp_buffer_info_t bufinfo;
7269
mp_get_buffer_raise(args[ARG_prefixes].u_obj, &bufinfo, MP_BUFFER_READ);

0 commit comments

Comments
 (0)