Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Separating OS specific keyword arguments #623

@hbldh

Description

@hbldh
  • bleak version: 0.12.0
  • Python version: All
  • Operating System: All

Bleak has several OS specific keyword, all of which are integrated into the regular **kwargs input to methods. The primary means of making users aware of what they can do to affect their current environment is through documentation. The documentation does provide this, but it is evidently not enough, given the amount of issues that e.g. asks why device="hci1 does not work in Windows to select another Adapter.

@dlech proposed two different ways of improving Bleak in this regards:

  1. Using a win_, macos_, and linux_ prefix to keyword arguments that are os specific.
  2. Using a win={"x"=1. "y"=2, ...} style of OS specific grouping of parameters.

Both will render nicely with black and both relays the desired effect in my mind. @hbldh prefers the second way, but given that Bleak currently has few OS specific parameters it will be almost equal. Given that I, creator of Bleak, has much less use of it that most everyone else that will read this will have, I am more that ready to yield to public demand.

I vote 2, and everyone else that votes will have his or her's vote counted equally. At the first of September, I will start to implement the winning choice. IF someone beats me to the implementation of one of the choices, I will take that one.

Metadata

Metadata

Assignees

Labels

Backend: BlueZIssues and PRs relating to the BlueZ backendBackend: Core BluetoothIssues and PRs relating to the Core Bluetooth backendBackend: WinRTIssues or PRs relating to the WinRT backendOpinions AppreciatedPlease add an opinion on your desired resolution on this issue!enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions