Skip to content

[pre-commit.ci] pre-commit autoupdate #246

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# * Run "pre-commit install".
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-toml
- id: check-yaml
Expand All @@ -16,14 +16,14 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.7
rev: v0.11.7
hooks:
- id: ruff
args: [--fix, --show-fixes]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.15.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
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