Skip to content

Commit 6e6681b

Browse files
committed
docs: Simplify typechecking import for rp2.asm_pio
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
1 parent 9bd39e8 commit 6e6681b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

docs/32_rp2_asm.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,12 @@ The @rp2.asm_pio decorator allows you to define custom PIO programs in MicroPyth
77

88
PIO instructions do not follow standard Python syntax, so most type checkers cannot parse them by default. This assembly-like approach is specific to the PIO hardware and relies on features not recognized by typical Python tools.
99

10-
To enable type checking for PIO code, you can the following block before the first `@rp2.asm_pio` function.
10+
To enable type checking for PIO code, you can the following block before the first `@rp2.asm_pio` function.
1111

1212
```py
1313
# -----------------------------------------------
1414
# add type hints for the rp2.asm_pio PIO Instructions
15-
try:
16-
from typing_extensions import TYPE_CHECKING # type: ignore
17-
except ImportError:
18-
TYPE_CHECKING = False
15+
TYPE_CHECKING = False
1916
if TYPE_CHECKING:
2017
from rp2.asm_pio import *
2118
# -----------------------------------------------

0 commit comments

Comments
 (0)