mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[python] Turn a warning into a error when appropriate
This commit is contained in:
committed by
EmilieNumworks
parent
cbb0110c2f
commit
56f4b275a5
@@ -114,7 +114,11 @@ mp_obj_t modpyplot_axis(size_t n_args, const mp_obj_t *args) {
|
||||
} else {
|
||||
mp_raise_ValueError("Unrecognized string given to axis; try 'on', 'off' or 'auto'");
|
||||
}
|
||||
#warning Use mp_obj_is_bool when upgrading uPy
|
||||
#if MICROPY_OBJ_IMMEDIATE_OBJS
|
||||
/* This couldn't be done at the time of writing because mp_obj_is_bool didn't
|
||||
* exist just yet. */
|
||||
#error Use mp_obj_is_bool instead of mp_obj_is_type
|
||||
#endif
|
||||
} else if (mp_obj_is_type(arg, &mp_type_bool)) {
|
||||
sPlotStore->setAxesRequested(mp_obj_is_true(arg));
|
||||
} else if (mp_obj_is_type(arg, &mp_type_tuple) || mp_obj_is_type(arg, &mp_type_list)) {
|
||||
|
||||
Reference in New Issue
Block a user