Skip to content

Commit c134de4

Browse files
committed
docs: Clarify TYPE_CHECKING behavior in rp2.asm_pio documentation
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
1 parent 6e6681b commit c134de4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/32_rp2_asm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if TYPE_CHECKING:
2020

2121
This block of code does the following:
2222

23-
- Tries to import TYPE_CHECKING from typing_extensions. when the code runs , this will fail , and sets TYPE_CHECKING to False.
23+
- Set TYPE_CHECKING to False. [A bit of a shortcut - discussion in typing community](https://discuss.python.org/t/specify-type-checking-false-without-typing-import/76766)
2424
- If TYPE_CHECKING is True, that means that a type-checker is assessing the code , and it imports all the necessary types from rp2.asm_pio.
2525
This ensures that type checkers can understand the PIO instructions, even though they do not follow standard Python syntax.
2626
This is useful for catching errors in your PIO code before running it on your RP2 board.

0 commit comments

Comments
 (0)