Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 21, 2024
1 parent 5ad6cc6 commit 1c90819
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cbor2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
from ._decoder import load as load
from ._decoder import loads as loads
from ._encoder import CBOREncoder as CBOREncoder
from ._encoder import canonical_encoders as canonical_encoders
from ._encoder import default_encoders as default_encoders
from ._encoder import dump as dump
from ._encoder import dumps as dumps
from ._encoder import shareable_encoder as shareable_encoder
from ._encoder import default_encoders as default_encoders
from ._encoder import canonical_encoders as canonical_encoders
from ._types import CBORDecodeEOF as CBORDecodeEOF
from ._types import CBORDecodeError as CBORDecodeError
from ._types import CBORDecodeValueError as CBORDecodeValueError
Expand Down
6 changes: 4 additions & 2 deletions cbor2/_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@ def wrapper(encoder: CBOREncoder, value: Any) -> None:

return wrapper


# type CBOREncoderDict = dict[type | tuple[str, str], Callable[[CBOREncoder, Any], None]]
CBOREncoderDict = dict[type | tuple[str, str], Callable[[Any, Any], None]]


class CBOREncoder:
"""
The CBOREncoder class implements a fully featured `CBOR`_ encoder with
Expand Down Expand Up @@ -736,7 +738,7 @@ def dumps(
datetime_as_timestamp=datetime_as_timestamp,
timezone=timezone,
value_sharing=value_sharing,
encoders = encoders,
encoders=encoders,
default=default,
date_as_datetime=date_as_datetime,
string_referencing=string_referencing,
Expand Down Expand Up @@ -792,7 +794,7 @@ def dump(
datetime_as_timestamp=datetime_as_timestamp,
timezone=timezone,
value_sharing=value_sharing,
encoders = encoders,
encoders=encoders,
default=default,
date_as_datetime=date_as_datetime,
string_referencing=string_referencing,
Expand Down

0 comments on commit 1c90819

Please sign in to comment.