We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 240678e commit f17a235Copy full SHA for f17a235
1 file changed
shared-bindings/gamepad/GamePad.c
@@ -94,9 +94,12 @@ gamepad_obj_t* volatile gamepad_singleton = NULL;
94
//|
95
STATIC mp_obj_t gamepad_make_new(const mp_obj_type_t *type, size_t n_args,
96
size_t n_kw, const mp_obj_t *args) {
97
+ if (n_args > 8) {
98
+ mp_raise_TypeError("too many arguments");
99
+ }
100
for (size_t i = 0; i < n_args; ++i) {
101
if (!MP_OBJ_IS_TYPE(args[i], &digitalio_digitalinout_type)) {
- mp_raise_TypeError("Expected a DigitalInOut");
102
+ mp_raise_TypeError("expected a DigitalInOut");
103
}
104
digitalio_digitalinout_obj_t *pin = MP_OBJ_TO_PTR(args[i]);
105
raise_error_if_deinited(
0 commit comments