David Lechner

Results 1570 comments of David Lechner

Bleak should already have (mostly?) complete type hints - at least for the public APIs. Happy to take a PR to fix mypy errors. It could be better if we...

Calling async code from non-async is outside of the scope of bleak and not a use case we want to spend time supporting. If you don't want to use asyncio,...

I suppose we could make this less breaking by issuing a warning and calling the init function the first time a scanner is started if it has not already been...

> Can't we switch to a factory function for the classes instead? Yes, that would work, but is still a breaking change. And would probably require more than just adding...

Thanks for the suggestion. However, some of the features that need to be added to this are async and we can't call async functions from `__new__()` or `__init__()`.

This is why I was thinking we could make a new global async init function. Users can call it explicitly if they need custom options or if they want to...

> You would still need to do detections to figure out which backend yo use right? Yes, that would not change.

Closing since most of the problems this would solve have been fixed other ways. There is still potentially a need for a `BleakAdapter` class as described in https://github.com/hbldh/bleak/issues/992#issuecomment-1242760927

"device not found" seems like a good starting point since it has been mentioned several times here. What would the specs be? My initial thoughts are that it should mean...

For a "not connected" error, we could save some work on the implementation by waiting for #982 to be merged. Then it only has to be implemented in the front...