diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 59110ee..f57a692 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ # * Run "pre-commit install". repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v6.0.0 hooks: - id: check-toml - id: check-yaml @@ -16,14 +16,14 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.7 + rev: v0.14.10 hooks: - id: ruff args: [--fix, --show-fixes] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.2 + rev: v1.19.1 hooks: - id: mypy additional_dependencies: diff --git a/cbor2/_encoder.py b/cbor2/_encoder.py index bdd92dd..b3e0983 100644 --- a/cbor2/_encoder.py +++ b/cbor2/_encoder.py @@ -557,7 +557,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: diff --git a/tests/test_encoder.py b/tests/test_encoder.py index e6adc08..8ccb82f 100644 --- a/tests/test_encoder.py +++ b/tests/test_encoder.py @@ -669,16 +669,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