Skip to content

Commit

Permalink
tests: update test for @no_type_check
Browse files Browse the repository at this point in the history
  • Loading branch information
Josverl authored Nov 4, 2024
1 parent 1323fb8 commit 53ad09c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/quality_tests/check_rp2/check_rp2/check_asm_pio.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@
# ref : https://docs.micropython.org/en/latest/rp2/quickref.html#programmable-io-pio
"""
from typing import no_type_check
import typing
import rp2
from machine import Pin
import time


@no_type_check
def foo() -> str:
return 12345 # No error!


# mypy: ignore-errors
@no_type_check
@rp2.asm_pio(set_init=rp2.PIO.OUT_LOW)
def blink_1hz():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
from typing import no_type_check
import rp2
from machine import Pin
import time

@no_type_check
def foo() -> str:
return 12345 # No error!

# mypy: ignore-errors
@no_type_check
@rp2.asm_pio(set_init=0)
def blink_1hz():
Expand Down

0 comments on commit 53ad09c

Please sign in to comment.