Skip to content

Commit 1c3e05f

Browse files
committed
Bump pre-commit hooks
1 parent 2ce0128 commit 1c3e05f

File tree

3 files changed

+25
-19
lines changed

3 files changed

+25
-19
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
repos:
22
- repo: https://github.com/PyCQA/flake8
3-
rev: 6.0.0
3+
rev: 7.0.0
44
hooks:
55
- id: flake8
66
- repo: https://github.com/psf/black
7-
rev: 23.3.0
7+
rev: 24.2.0
88
hooks:
99
- id: black
1010
- repo: https://github.com/PyCQA/bandit
11-
rev: 1.7.5
11+
rev: 1.7.7
1212
hooks:
1313
- id: bandit
1414
exclude: ^tests/
1515
- repo: https://github.com/pre-commit/mirrors-mypy
16-
rev: v1.4.1
16+
rev: v1.8.0
1717
hooks:
1818
- id: mypy
1919
files: ^fido2/

fido2/server.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,11 @@ def _wrap_credentials(
109109
if creds is None:
110110
return None
111111
return [
112-
to_descriptor(c)
113-
if isinstance(c, AttestedCredentialData)
114-
else PublicKeyCredentialDescriptor.from_dict(c)
112+
(
113+
to_descriptor(c)
114+
if isinstance(c, AttestedCredentialData)
115+
else PublicKeyCredentialDescriptor.from_dict(c)
116+
)
115117
for c in creds
116118
]
117119

@@ -198,19 +200,21 @@ def register_begin(
198200
self.allowed_algorithms,
199201
self.timeout,
200202
descriptors,
201-
AuthenticatorSelectionCriteria(
202-
authenticator_attachment,
203-
resident_key_requirement,
204-
user_verification,
205-
)
206-
if any(
207-
(
203+
(
204+
AuthenticatorSelectionCriteria(
208205
authenticator_attachment,
209206
resident_key_requirement,
210207
user_verification,
211208
)
212-
)
213-
else None,
209+
if any(
210+
(
211+
authenticator_attachment,
212+
resident_key_requirement,
213+
user_verification,
214+
)
215+
)
216+
else None
217+
),
214218
self.attestation,
215219
extensions,
216220
)

fido2/webauthn.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,11 @@ def __post_init__(self):
516516
object.__setattr__(
517517
self,
518518
"resident_key",
519-
ResidentKeyRequirement.REQUIRED
520-
if self.require_resident_key
521-
else ResidentKeyRequirement.DISCOURAGED,
519+
(
520+
ResidentKeyRequirement.REQUIRED
521+
if self.require_resident_key
522+
else ResidentKeyRequirement.DISCOURAGED
523+
),
522524
)
523525
object.__setattr__(
524526
self,

0 commit comments

Comments
 (0)