Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There were lots of tiny modules, which is not idiomatic Python. I have replaced most of those, and simplified the module structure of the client a lot. Most of these are simple moves without a code change.
Apart from that, I have applied isort and black to whole code base. I plan to add them to CI in the short term as well, in another PR.
Below, I list other small changes I did as part of this PR:
Exception
class are prefixed with Error throughout the standard library and ecosystem.rest_encoding
parameter fromboolean | Literal["base64"]
toNone | Literal["base64"]
. I believe it conveys the message better.FormattedResponse
altogether. It was not providing any benefit other than providing the dict of formatters. I converted it into a simple dictionary.rest_retry_interval
parameter into afloat
fromint
. Time related parameters are generally given as floats that represent seconds. It also makes more sense, as you now able to provide more granular times.CommandsProtocol
altogether. That abstraction was not used at all.