Josverl / micropython-stubs

Stubs of most MicroPython ports, boards and versions to make writing code that much simpler.
https://micropython-stubs.readthedocs.io
MIT License
133 stars 21 forks source link

mypy: Cannot instantiate abstract class "ESPNow" with abstract attribute "__next__" #737

Open Josverl opened 6 months ago

Josverl commented 6 months ago

for the code:

import espnow
e = espnow.ESPNow()

Cannot instantiate abstract class "ESPNow" with abstract attribute "next"

this is caused by the docstubs adding a fake baseclass to support the iterator in a few other cases "ESPNow": "ESPNowBase,Iterator", # causes issue with mypy to resolve some issues reported by pyright

IIRC also about __next__ missing