diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a2c21af..8662862 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.5.0 + rev: v4.6.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.2.2 + rev: v0.3.5 hooks: - id: ruff args: [--fix, --show-fixes] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.8.0 + rev: v1.9.0 hooks: - id: mypy additional_dependencies: diff --git a/cbor2/_decoder.py b/cbor2/_decoder.py index 0e60008..ca530c0 100644 --- a/cbor2/_decoder.py +++ b/cbor2/_decoder.py @@ -250,12 +250,10 @@ def decode_from_bytes(self, buf: bytes) -> object: return retval @overload - def _decode_length(self, subtype: int) -> int: - ... + def _decode_length(self, subtype: int) -> int: ... @overload - def _decode_length(self, subtype: int, allow_indefinite: Literal[True]) -> int | None: - ... + def _decode_length(self, subtype: int, allow_indefinite: Literal[True]) -> int | None: ... def _decode_length(self, subtype: int, allow_indefinite: bool = False) -> int | None: if subtype < 24: diff --git a/cbor2/tool.py b/cbor2/tool.py index 94eb180..b9e81db 100644 --- a/cbor2/tool.py +++ b/cbor2/tool.py @@ -1,4 +1,5 @@ """Command-line tool for CBOR diagnostics and testing""" + from __future__ import annotations import argparse