Skip to content

Commit 6e3fe07

Browse files
committed
remove redundant type check. remove blank line. revert locale change
1 parent 459f896 commit 6e3fe07

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

locale/circuitpython.pot

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2721,11 +2721,6 @@ msgstr ""
27212721
msgid "binary op %q not implemented"
27222722
msgstr ""
27232723

2724-
#: shared-bindings/displayio/TileGrid.c
2725-
msgid ""
2726-
"bitmap must be displayio.Bitmap, displayio.Shape, or displayio.OnDiskBitmap"
2727-
msgstr ""
2728-
27292724
#: shared-bindings/bitmaptools/__init__.c
27302725
msgid "bitmap sizes must match"
27312726
msgstr ""
@@ -3028,7 +3023,7 @@ msgstr ""
30283023
msgid "complex values not supported"
30293024
msgstr ""
30303025

3031-
#: extmod/moduzlib.c
3026+
#: extmod/moduzlib.c shared-module/zlib/DecompIO.c
30323027
msgid "compression header"
30333028
msgstr ""
30343029

shared-bindings/displayio/TileGrid.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ STATIC mp_obj_t displayio_tilegrid_make_new(const mp_obj_type_t *type, size_t n_
137137
return MP_OBJ_FROM_PTR(self);
138138
}
139139

140-
141140
// Helper to ensure we have the native super class instead of a subclass.
142141
static displayio_tilegrid_t *native_tilegrid(mp_obj_t tilegrid_obj) {
143142
mp_obj_t native_tilegrid = mp_obj_cast_to_native_base(tilegrid_obj, &displayio_tilegrid_type);
@@ -392,12 +391,6 @@ MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_bitmap_obj, displayio_tilegrid_
392391

393392
STATIC mp_obj_t displayio_tilegrid_obj_set_bitmap(mp_obj_t self_in, mp_obj_t bitmap) {
394393
displayio_tilegrid_t *self = native_tilegrid(self_in);
395-
if (!mp_obj_is_type(bitmap, &displayio_bitmap_type) &&
396-
!mp_obj_is_type(bitmap, &displayio_ondiskbitmap_type) &&
397-
!mp_obj_is_type(bitmap, &displayio_shape_type)) {
398-
399-
mp_raise_TypeError(translate("bitmap must be displayio.Bitmap, displayio.Shape, or displayio.OnDiskBitmap"));
400-
}
401394

402395
uint16_t new_bitmap_width;
403396
uint16_t new_bitmap_height;

0 commit comments

Comments
 (0)