Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanups #324

Merged
merged 9 commits into from
Oct 23, 2020
Merged

Cleanups #324

merged 9 commits into from
Oct 23, 2020

Conversation

dlech
Copy link
Collaborator

@dlech dlech commented Oct 7, 2020

These are some various code cleanups. Mostly suggested by flake8.

@dlech dlech force-pushed the cleanups branch 2 times, most recently from 6eaead5 to c1bae18 Compare October 8, 2020 15:42
@dlech
Copy link
Collaborator Author

dlech commented Oct 8, 2020

We should be careful with the "Remove unused imports" commit. It it probably removes some stuff that is used in later pull requests like Object in the dotnet client.py.

@hbldh
Copy link
Owner

hbldh commented Oct 9, 2020

Very good. We wait with this one until #328 is merged.

@hbldh hbldh added Backend: pythonnet Issues or PRs relating to the .NET/pythonnet backend Backend: BlueZ Issues and PRs relating to the BlueZ backend Backend: Core Bluetooth Issues and PRs relating to the Core Bluetooth backend Documentation Issues or PRs relating to RTD or documentation enhancement New feature or request labels Oct 9, 2020
@dlech dlech marked this pull request as draft October 10, 2020 03:20
The `BLEDevice` class is already defined for all backends in
`bleak/backends/device.py`. It looks like an extra copy is left over
in the CoreBluetooth that can be removed.
The arguments listed were probably for a older version of the function.

This also fixes an unused import warning from flake8 since IAsyncOperation is now used for the type hint.
@dlech dlech marked this pull request as ready for review October 23, 2020 17:02
This fixes flake8 E722. Using bare except will also catch BaseException
which would suppress things like KeyboardInterrupt.
This fixes flake8 E713.
black randomly decided that it wants commas here now
E203: black adds spaces around `:` in some cases
E501: black allows long lines in some cases
W503: black disagrees with flake8 on line breaks before binary operators
As reported by flake8 F401.
As reported by flake8 F841.
@dlech dlech merged commit d7e9558 into develop Oct 23, 2020
@dlech dlech deleted the cleanups branch October 23, 2020 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend: BlueZ Issues and PRs relating to the BlueZ backend Backend: Core Bluetooth Issues and PRs relating to the Core Bluetooth backend Backend: pythonnet Issues or PRs relating to the .NET/pythonnet backend Documentation Issues or PRs relating to RTD or documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants