Skip to content

Commit

Permalink
refactor: Improve type hints and formatting (#133)
Browse files Browse the repository at this point in the history
* Use isort and black to format

* Fix most mypy errors

* Fix all typing error with strict mypy

* Replace *args, **kwargs by explicit parameters

* Use ssl._PasswordType instead of str

* Fix typing

- Add *args, **kwargs to subscribe, unsubscribe and publish
- Remove forward reference
- Remove private ssl types
- Revert _pending_subscribes to asyncio.Future
- Use Union instead of |
- Use List and Tuple instead of list and tuple
-  Other minor changes

* Fix tls_version type

* Change Awaitable with Coroutine for _outgoing_call
  • Loading branch information
JonathanPlasse authored Oct 15, 2022
1 parent 68acce8 commit a150973
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ build
dist
*.egg-info
local_test.py

.venv
.idea/
4 changes: 2 additions & 2 deletions asyncio_mqtt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
from .error import MqttError, MqttCodeError
from .client import Client, Will, ProtocolVersion, TLSParameters
from .client import Client, ProtocolVersion, TLSParameters, Will
from .error import MqttCodeError, MqttError
from .version import __version__

__all__ = [
Expand Down
Loading

0 comments on commit a150973

Please sign in to comment.