Skip to content

Commit cafcb05

Browse files
author
brentru
committed
update CI to search subfolders
1 parent 28a47e5 commit cafcb05

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
run: |
5555
pylint $( find . -path './adafruit*.py' )
5656
([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace $( find . -path "./examples/*.py" ))
57+
([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace $( find . -path "./examples/*/*.py" ))
5758
- name: Build assets
5859
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
5960
- name: Archive bundles

examples/cpython/minimqtt_simpletest_cpython.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,34 +34,40 @@ def connect(mqtt_client, userdata, flags, rc):
3434
print("Connected to MQTT Broker!")
3535
print("Flags: {0}\n RC: {1}".format(flags, rc))
3636

37+
3738
def disconnect(mqtt_client, userdata, rc):
3839
# This method is called when the mqtt_client disconnects
3940
# from the broker.
4041
print("Disconnected from MQTT Broker!")
4142

43+
4244
def subscribe(mqtt_client, userdata, topic, granted_qos):
4345
# This method is called when the mqtt_client subscribes to a new feed.
4446
print("Subscribed to {0} with QOS level {1}".format(topic, granted_qos))
4547

48+
4649
def unsubscribe(mqtt_client, userdata, topic, pid):
4750
# This method is called when the mqtt_client unsubscribes from a feed.
4851
print("Unsubscribed from {0} with PID {1}".format(topic, pid))
4952

53+
5054
def publish(mqtt_client, userdata, topic, pid):
5155
# This method is called when the mqtt_client publishes data to a feed.
5256
print("Published to {0} with PID {1}".format(topic, pid))
5357

58+
5459
def message(client, topic, message):
5560
# Method callled when a client's subscribed feed has a new value.
5661
print("New message on topic {0}: {1}".format(topic, message))
5762

63+
5864
# Set up a MiniMQTT Client
5965
mqtt_client = MQTT.MQTT(
6066
broker=secrets["broker"],
6167
username=secrets["aio_username"],
6268
password=secrets["aio_key"],
6369
socket_pool=socket,
64-
ssl_context=ssl.create_default_context()
70+
ssl_context=ssl.create_default_context(),
6571
)
6672

6773
# Connect callback handlers to mqtt_client

0 commit comments

Comments
 (0)