summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2023-08-09 18:18:50 +1000
committerDamien George <damien@micropython.org>2023-08-16 16:13:27 +1000
commit801910fc837919688b98e9abce04a679f14037be (patch)
tree5a58f25b9e938e3fa7145c5bb617ae83dc9f3ac9
parentef864a4aa4370ea1b659496e4d0f145bbc28bec3 (diff)
downloadmicropython-801910fc837919688b98e9abce04a679f14037be.tar.gz
micropython-801910fc837919688b98e9abce04a679f14037be.zip
all: Add missing imports for micropython.const.
Found by Ruff checking F821. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-rw-r--r--examples/bluetooth/ble_uart_repl.py1
-rw-r--r--ports/nrf/examples/ssd1306_mod.py1
-rw-r--r--ports/nrf/examples/ubluepy_eddystone.py1
-rw-r--r--ports/stm32/boards/NUCLEO_WB55/rfcore_debug.py1
4 files changed, 4 insertions, 0 deletions
diff --git a/examples/bluetooth/ble_uart_repl.py b/examples/bluetooth/ble_uart_repl.py
index 7d92c1f318..5812a5cc13 100644
--- a/examples/bluetooth/ble_uart_repl.py
+++ b/examples/bluetooth/ble_uart_repl.py
@@ -7,6 +7,7 @@ import bluetooth
import io
import os
import micropython
+from micropython import const
import machine
from ble_uart_peripheral import BLEUART
diff --git a/ports/nrf/examples/ssd1306_mod.py b/ports/nrf/examples/ssd1306_mod.py
index b083a3aa7e..d42d165fa8 100644
--- a/ports/nrf/examples/ssd1306_mod.py
+++ b/ports/nrf/examples/ssd1306_mod.py
@@ -19,6 +19,7 @@
# disp = SSD1306_I2C_Mod(128, 64, i2c)
from ssd1306 import SSD1306_I2C
+from micropython import const
SET_COL_ADDR = const(0x21)
SET_PAGE_ADDR = const(0x22)
diff --git a/ports/nrf/examples/ubluepy_eddystone.py b/ports/nrf/examples/ubluepy_eddystone.py
index 96818d01c2..c98a2266f5 100644
--- a/ports/nrf/examples/ubluepy_eddystone.py
+++ b/ports/nrf/examples/ubluepy_eddystone.py
@@ -1,3 +1,4 @@
+from micropython import const
from ubluepy import Peripheral, constants
BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE = const(0x02)
diff --git a/ports/stm32/boards/NUCLEO_WB55/rfcore_debug.py b/ports/stm32/boards/NUCLEO_WB55/rfcore_debug.py
index 4dbead0acc..db533f18dc 100644
--- a/ports/stm32/boards/NUCLEO_WB55/rfcore_debug.py
+++ b/ports/stm32/boards/NUCLEO_WB55/rfcore_debug.py
@@ -35,6 +35,7 @@
# See rfcore_firmware.py for more information.
from machine import mem8, mem16, mem32
+from micropython import const
import stm
SRAM2A_BASE = const(0x2003_0000)