Problem
Some drivers import from utime instead of time. The utime module is deprecated since MicroPython 1.19+ and time is the standard replacement. Additionally, some drivers use time.sleep() with float seconds instead of the MicroPython-idiomatic sleep_ms() with integer milliseconds.
Already fixed
To review
Expected behavior
All drivers must use:
from time import sleep_ms (not from utime import)
sleep_ms(N) with integer milliseconds (not sleep(0.N) with float seconds)
Reference
Problem
Some drivers import from
utimeinstead oftime. Theutimemodule is deprecated since MicroPython 1.19+ andtimeis the standard replacement. Additionally, some drivers usetime.sleep()with float seconds instead of the MicroPython-idiomaticsleep_ms()with integer milliseconds.Already fixed
from utime import sleep_ms, ticks_ms→from time import sleep_ms, ticks_msTo review
lib/wsen-pads/wsen_pads/device.py) — usesfrom utime import sleep_ms, ticks_ms, ticks_difflib/apds9960/apds9960/device.py) — usesfrom time import sleepthensleep(0.3)— should usesleep_ms(300)Expected behavior
All drivers must use:
from time import sleep_ms(notfrom utime import)sleep_ms(N)with integer milliseconds (notsleep(0.N)with float seconds)Reference
README.md— "Coding conventions" section