You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
time.sleep_ms is imported properly, time.sleep_ms no longer has the red wavy line
Actual behavior
time.sleep_ms is prompted not to exist in time
Note: sleep_ms is explicitly defined in /build-code-snippet/mpy/pyi/time.pyi.
def sleep_ms(ms: int, /) -> None:
"""
Delay for given number of milliseconds, should be positive or 0.
This function will delay for at least the given number of milliseconds, but
may take longer than that if other processing must take place, for example
interrupt handlers or other threads. Passing in 0 for *ms* will still allow
this other processing to occur. Use `sleep_us()` for more precise delays.
"""
Replace time.pyi with /build-code-snippet/mpy/pyi/time.pyi in the pylance stub file in vscode and the red wavy line disappears.
And you can find the definition correctly
The text was updated successfully, but these errors were encountered:
Environment data
Repro Steps
In .vscode/settings.json under the workspace add
“python.analysis.exclude": [
“/Users/tinyu/.vscode/extensions/ms-python.vscode-pylance-2024.11.2/dist/typeshed-fallback/stdlib/time.pyi” ]. ].
], .
and add
“python.analysis.include": [
“/Users/tinyu/Developer/Code/uiflow_micropython/build-code-snippet/mpy/pyi"]. .
], .
“python.autoComplete.extraPaths": [
“. /build-code-snippet/mpy/pyi”, [. /build-code-snippet/mpy/pyi”.
“. /m5stack/libs”,
“. /micropython”.
], .
“python.analysis.extraPaths": [
“. /build-code-snippet/mpy/pyi”, [. /build-code-snippet/mpy/pyi”.
“. /m5stack/libs”,
“. /micropython”.
], .
Add the file /build-code-snippet/mpy/pyi to your workspace directory, download it from https://makingfun.oss-cn-qingdao.aliyuncs.com/m5stack/temp/micropython-pyi.zip.
Expected behavior
time.sleep_ms is imported properly, time.sleep_ms no longer has the red wavy line
Actual behavior
time.sleep_ms is prompted not to exist in time
Note: sleep_ms is explicitly defined in /build-code-snippet/mpy/pyi/time.pyi.
Replace time.pyi with /build-code-snippet/mpy/pyi/time.pyi in the pylance stub file in vscode and the red wavy line disappears.
And you can find the definition correctly
The text was updated successfully, but these errors were encountered: