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 Jan 20, 2025
1 parent 18cce3e commit 3481634
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cbor2/_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def encode_datetime(self, value: datetime) -> None:
value = value.replace(tzinfo=self._timezone)
else:
raise CBOREncodeValueError(
f"naive datetime {value!r} encountered and no default timezone " "has been set"
f"naive datetime {value!r} encountered and no default timezone has been set"
)

if self.datetime_as_timestamp:
Expand Down
11 changes: 1 addition & 10 deletions tests/test_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,16 +622,7 @@ def test_encode_stringrefs_array(impl):
def test_encode_stringrefs_dict(impl):
value = {"aaaa": "mmmm", "bbbb": "bbbb", "cccc": "aaaa", "mmmm": "aaaa"}
expected = unhexlify(
"d90100"
"a4"
"6461616161"
"646d6d6d6d"
"6462626262"
"d81902"
"6463636363"
"d81900"
"d81901"
"d81900"
"d90100a46461616161646d6d6d6d6462626262d819026463636363d81900d81901d81900"
)
assert impl.dumps(value, string_referencing=True, canonical=True) == expected

Expand Down

0 comments on commit 3481634

Please sign in to comment.