eclipse-paho / eclipse-paho/paho.mqtt.python
Pylance complains about "CallbackAPIVersion" is not exported from module "paho.mqtt.client"
Open
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
Assessment
This issue has not been assessed yet.