Skip to content

Commit 9ee278d

Browse files
committed
Merge remote-tracking branch 'upstream/master' into mimxrt-busio-cleanup
2 parents fd00bb8 + f72d166 commit 9ee278d

File tree

6 files changed

+21
-6
lines changed

6 files changed

+21
-6
lines changed

ports/nrf/boards/hiibot_bluefi/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
USB_VID = 0x239A
2-
USB_PID = 0x0016
2+
USB_PID = 0x80B2
33
USB_PRODUCT = "HiiBot BlueFi"
44
USB_MANUFACTURER = "HiiBot"
55

shared-bindings/audiobusio/I2SOut.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
//| length = 8000 // 440
6262
//| sine_wave = array.array("H", [0] * length)
6363
//| for i in range(length):
64-
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15) + 2 ** 15)
64+
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / length) * (2 ** 15) + 2 ** 15)
6565
//|
6666
//| sine_wave = audiocore.RawSample(sine_wave, sample_rate=8000)
6767
//| i2s = audiobusio.I2SOut(board.D1, board.D0, board.D9)

shared-bindings/audiocore/RawSample.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
//| length = 8000 // 440
6262
//| sine_wave = array.array("h", [0] * length)
6363
//| for i in range(length):
64-
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15))
64+
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / length) * (2 ** 15))
6565
//|
6666
//| dac = audioio.AudioOut(board.SPEAKER)
6767
//| sine_wave = audiocore.RawSample(sine_wave)

shared-bindings/audioio/AudioOut.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
//| length = 8000 // 440
6262
//| sine_wave = array.array("H", [0] * length)
6363
//| for i in range(length):
64-
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15) + 2 ** 15)
64+
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / length) * (2 ** 15) + 2 ** 15)
6565
//|
6666
//| dac = audioio.AudioOut(board.SPEAKER)
6767
//| sine_wave = audiocore.RawSample(sine_wave, sample_rate=8000)

shared-bindings/audiopwmio/PWMAudioOut.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
//| length = 8000 // 440
6464
//| sine_wave = array.array("H", [0] * length)
6565
//| for i in range(length):
66-
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15) + 2 ** 15)
66+
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / length) * (2 ** 15) + 2 ** 15)
6767
//|
6868
//| dac = audiopwmio.PWMAudioOut(board.SPEAKER)
6969
//| sine_wave = audiocore.RawSample(sine_wave, sample_rate=8000)

tools/extract_pyi.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,22 @@ def convert_folder(top_level, stub_directory):
5252
# Validate that the module is a parseable stub.
5353
total += 1
5454
try:
55-
astroid.parse(stub_contents)
55+
tree = astroid.parse(stub_contents)
56+
for i in tree.body:
57+
if 'name' in i.__dict__:
58+
print(i.__dict__['name'])
59+
for j in i.body:
60+
if isinstance(j, astroid.scoped_nodes.FunctionDef):
61+
if None in j.args.__dict__['annotations']:
62+
print(f"Missing parameter type: {j.__dict__['name']} on line {j.__dict__['lineno']}\n")
63+
if j.returns:
64+
if 'Any' in j.returns.__dict__.values():
65+
print(f"Missing return type: {j.__dict__['name']} on line {j.__dict__['lineno']}")
66+
elif isinstance(j, astroid.node_classes.AnnAssign):
67+
if 'name' in j.__dict__['annotation'].__dict__:
68+
if j.__dict__['annotation'].__dict__['name'] == 'Any':
69+
print(f"missing attribute type on line {j.__dict__['lineno']}")
70+
5671
ok += 1
5772
except astroid.exceptions.AstroidSyntaxError as e:
5873
e = e.__cause__

0 commit comments

Comments
 (0)