Skip to content

Commit

Permalink
Update pre-commit hooks.
Browse files Browse the repository at this point in the history
  • Loading branch information
dainnilsson committed Jul 6, 2023
1 parent ed9f50a commit 8760f79
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
repos:
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
rev: 1.7.5
hooks:
- id: bandit
exclude: ^tests/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.4.1
hooks:
- id: mypy
files: ^fido2/
1 change: 0 additions & 1 deletion fido2/hid/freebsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ def _read_descriptor(vid, pid, name, serial, path):

def _enumerate():
for uhid in glob.glob(devdir + "uhid?*"):

index = uhid[len(devdir) + len("uhid") :]
if not index.isdigit():
continue
Expand Down
1 change: 0 additions & 1 deletion fido2/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ def authenticate_begin(
challenge: Optional[bytes] = None,
extensions=None,
) -> Tuple[CredentialRequestOptions, Any]:

"""Return a PublicKeyCredentialRequestOptions assertion object and the internal
state dictionary that needs to be passed as is to the corresponding
`authenticate_complete` call.
Expand Down
3 changes: 3 additions & 0 deletions fido2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
Any,
TypeVar,
Hashable,
ClassVar,
get_type_hints,
)
import struct
Expand Down Expand Up @@ -206,6 +207,8 @@ def _parse_value(t, value):


class _DataClassMapping(Mapping[_T, Any]):
__dataclass_fields__: ClassVar[dict[str, Field[Any]]]

def __post_init__(self):
hints = get_type_hints(type(self))
for f in fields(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cbor.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class TestCborTestVectors(unittest.TestCase):
"""

def test_vectors(self):
for (data, value) in _TEST_VECTORS:
for data, value in _TEST_VECTORS:
try:
self.assertEqual(cbor.decode_from(bytes.fromhex(data)), (value, b""))
self.assertEqual(cbor.decode(bytes.fromhex(data)), value)
Expand Down

0 comments on commit 8760f79

Please sign in to comment.