megakid / ha_octopus_intelligent

Apache License 2.0
86 stars 10 forks source link

Fix ImportError: cannot import name 'override' from 'typing' (Python 3.11) #44

Closed pdcastro closed 4 months ago

pdcastro commented 4 months ago

Fixes #43.

PR #37 introduced an @override code annotation that while correct, is only available with Python 3.12 and later. But Home Assistant, and this integration, currently still support Python 3.11. This PR thus removes that annotation. (The annotation is only a development aid and does change the code’s functionality.)

Tested with Home Assistant 2024.1.6 which is the last container release shipped with Python 3.11.