eclipse-paho / eclipse-paho/paho.mqtt.python

Pylance complains about "CallbackAPIVersion" is not exported from module "paho.mqtt.client"

Open
#892 9 comments 1 reaction 0 assignees View on GitHub
Status: Available
Dominant language
Python
Stars
2.4k
Forks
742
Avg merge
12d 48m
Merged PRs (30d)
1

Description

Minor inconvenience yet probably good to report:

This code runs fine, but Pylance with standard type checking complains about the Callback definitions.

Code:
` mqttc = mqtt.Client(callback_api_version = mqtt.CallbackAPIVersion.VERSION2, client_id = 'Palert',protocol = mqtt.MQTTv5)`
Results in pylance error:
"CallbackAPIVersion" is not exported from module "paho.mqtt.client"

Leave out the mqtt.:
` mqttc = mqtt.Client(callback_api_version = CallbackAPIVersion.VERSION2, client_id = 'Palert',protocol = mqtt.MQTTv5)`
error = "CallbackAPIVersion" is not defined

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.