Skip to content

Commit

Permalink
Merge branch 'master' into feat/local-decoders
Browse files Browse the repository at this point in the history
  • Loading branch information
theeldermillenial authored Apr 9, 2024
2 parents 1bb3ea7 + b95e395 commit c4a4045
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
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.5.0
rev: v4.6.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.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:
Expand Down
6 changes: 2 additions & 4 deletions cbor2/_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions cbor2/tool.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Command-line tool for CBOR diagnostics and testing"""

from __future__ import annotations

import argparse
Expand Down

0 comments on commit c4a4045

Please sign in to comment.