Skip to content

Commit

Permalink
Added type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Sep 4, 2023
1 parent f350941 commit 53e2106
Show file tree
Hide file tree
Showing 9 changed files with 584 additions and 304 deletions.
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ repos:
hooks:
- id: black

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
additional_dependencies:
- pytest
files: cbor2/.+

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion cbor2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# variants, but we still need to create the encoder dictionaries for the C
# variant here (this is much simpler than doing so in C, and doesn't affect
# overall performance as it's a one-off initialization cost).
def _init_cbor2():
def _init_cbor2() -> None:
from collections import OrderedDict

import _cbor2
Expand Down
Loading

0 comments on commit 53e2106

Please sign in to comment.