diff --git a/webauthn/helpers/parse_authentication_credential_json.py b/webauthn/helpers/parse_authentication_credential_json.py index a9ad604..5d5d8b8 100644 --- a/webauthn/helpers/parse_authentication_credential_json.py +++ b/webauthn/helpers/parse_authentication_credential_json.py @@ -7,7 +7,7 @@ def parse_authentication_credential_json(json_val: str) -> AuthenticationCredential: if PYDANTIC_V2: - parsing_method: Callable = AuthenticationCredential.model_validate_json + parsing_method: Callable = AuthenticationCredential.model_validate_json # type: ignore[attr-defined] else: # assuming V1 parsing_method = AuthenticationCredential.parse_raw diff --git a/webauthn/helpers/parse_registration_credential_json.py b/webauthn/helpers/parse_registration_credential_json.py index 2c2d12f..11a3c51 100644 --- a/webauthn/helpers/parse_registration_credential_json.py +++ b/webauthn/helpers/parse_registration_credential_json.py @@ -7,7 +7,7 @@ def parse_registration_credential_json(json_val: str) -> RegistrationCredential: if PYDANTIC_V2: - parsing_method: Callable = RegistrationCredential.model_validate_json + parsing_method: Callable = RegistrationCredential.model_validate_json # type: ignore[attr-defined] else: # assuming V1 parsing_method = RegistrationCredential.parse_raw diff --git a/webauthn/registration/formats/android_safetynet.py b/webauthn/registration/formats/android_safetynet.py index 8f4f750..5acf807 100644 --- a/webauthn/registration/formats/android_safetynet.py +++ b/webauthn/registration/formats/android_safetynet.py @@ -88,8 +88,8 @@ def verify_android_safetynet( ) if PYDANTIC_V2: - header = SafetyNetJWSHeader.model_validate_json(base64url_to_bytes(jws_parts[0])) - payload = SafetyNetJWSPayload.model_validate_json(base64url_to_bytes(jws_parts[1])) + header = SafetyNetJWSHeader.model_validate_json(base64url_to_bytes(jws_parts[0])) # type: ignore[attr-defined] + payload = SafetyNetJWSPayload.model_validate_json(base64url_to_bytes(jws_parts[1])) # type: ignore[attr-defined] else: header = SafetyNetJWSHeader.parse_raw(base64url_to_bytes(jws_parts[0])) payload = SafetyNetJWSPayload.parse_raw(base64url_to_bytes(jws_parts[1])) diff --git a/webauthn/registration/verify_registration_response.py b/webauthn/registration/verify_registration_response.py index 1df1ab7..562b884 100644 --- a/webauthn/registration/verify_registration_response.py +++ b/webauthn/registration/verify_registration_response.py @@ -203,7 +203,7 @@ def verify_registration_response( # A "none" attestation should not contain _anything_ in its attestation # statement if PYDANTIC_V2: - num_att_stmt_fields_set = len(attestation_object.att_stmt.model_fields_set) + num_att_stmt_fields_set = len(attestation_object.att_stmt.model_fields_set) # type: ignore[attr-defined] else: num_att_stmt_fields_set = len(attestation_object.att_stmt.__fields_set__)