mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
fix: restore quality gates after module renames
This commit is contained in:
@@ -22,9 +22,9 @@ from app.application.security.otp import OtpUtils
|
|||||||
from app.application.security.passkey import (
|
from app.application.security.passkey import (
|
||||||
PasskeyChallengeStore,
|
PasskeyChallengeStore,
|
||||||
PassKeyHelper,
|
PassKeyHelper,
|
||||||
PasskeyService,
|
|
||||||
PassKeyRegistrationOriginMismatchError,
|
PassKeyRegistrationOriginMismatchError,
|
||||||
PassKeyRegistrationVerificationError,
|
PassKeyRegistrationVerificationError,
|
||||||
|
PasskeyService,
|
||||||
)
|
)
|
||||||
from app.application.security.token import verify_password
|
from app.application.security.token import verify_password
|
||||||
from app.application.security.user import (
|
from app.application.security.user import (
|
||||||
|
|||||||
@@ -11,29 +11,26 @@ from typing import Any, Dict, List, Literal, Optional, Protocol, Tuple
|
|||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
from webauthn import (
|
from webauthn import (
|
||||||
generate_registration_options,
|
|
||||||
verify_registration_response,
|
|
||||||
generate_authentication_options,
|
generate_authentication_options,
|
||||||
|
generate_registration_options,
|
||||||
|
options_to_json,
|
||||||
verify_authentication_response,
|
verify_authentication_response,
|
||||||
options_to_json
|
verify_registration_response,
|
||||||
)
|
|
||||||
from webauthn.helpers import (
|
|
||||||
parse_registration_credential_json,
|
|
||||||
parse_authentication_credential_json
|
|
||||||
)
|
|
||||||
from webauthn.helpers.structs import (
|
|
||||||
PublicKeyCredentialDescriptor,
|
|
||||||
AuthenticatorTransport,
|
|
||||||
UserVerificationRequirement,
|
|
||||||
ResidentKeyRequirement,
|
|
||||||
AuthenticatorSelectionCriteria
|
|
||||||
)
|
)
|
||||||
|
from webauthn.helpers import parse_authentication_credential_json, parse_registration_credential_json
|
||||||
from webauthn.helpers.cose import COSEAlgorithmIdentifier
|
from webauthn.helpers.cose import COSEAlgorithmIdentifier
|
||||||
from webauthn.helpers.exceptions import InvalidRegistrationResponse
|
from webauthn.helpers.exceptions import InvalidRegistrationResponse
|
||||||
|
from webauthn.helpers.structs import (
|
||||||
|
AuthenticatorSelectionCriteria,
|
||||||
|
AuthenticatorTransport,
|
||||||
|
PublicKeyCredentialDescriptor,
|
||||||
|
ResidentKeyRequirement,
|
||||||
|
UserVerificationRequirement,
|
||||||
|
)
|
||||||
|
|
||||||
from app.runtime.cache import TTLCache
|
|
||||||
from app.application.configuration import get_api_runtime_config_snapshot
|
|
||||||
from app.adapters.cache.redis import RedisHelper
|
from app.adapters.cache.redis import RedisHelper
|
||||||
|
from app.application.configuration import get_api_runtime_config_snapshot
|
||||||
|
from app.runtime.cache import TTLCache
|
||||||
from app.runtime.log import logger
|
from app.runtime.log import logger
|
||||||
|
|
||||||
PASSKEY_CHALLENGE_TTL_SECONDS = 5 * 60
|
PASSKEY_CHALLENGE_TTL_SECONDS = 5 * 60
|
||||||
@@ -459,7 +456,7 @@ class PasskeyRepository(Protocol):
|
|||||||
def list(self) -> list[Any]:
|
def list(self) -> list[Any]:
|
||||||
"""列出全部启用凭证。"""
|
"""列出全部启用凭证。"""
|
||||||
|
|
||||||
def list_by_user_id(self, user_id: int) -> list[Any]:
|
def list_by_user_id(self, user_id: int) -> List[Any]:
|
||||||
"""列出指定用户凭证。"""
|
"""列出指定用户凭证。"""
|
||||||
|
|
||||||
def get_by_credential_id(self, credential_id: str) -> Optional[Any]:
|
def get_by_credential_id(self, credential_id: str) -> Optional[Any]:
|
||||||
@@ -486,7 +483,7 @@ class PasskeyService:
|
|||||||
"""列出全部启用凭证。"""
|
"""列出全部启用凭证。"""
|
||||||
return self._repository.list()
|
return self._repository.list()
|
||||||
|
|
||||||
def list_by_user_id(self, user_id: int) -> list[Any]:
|
def list_by_user_id(self, user_id: int) -> List[Any]:
|
||||||
"""列出指定用户凭证。"""
|
"""列出指定用户凭证。"""
|
||||||
return self._repository.list_by_user_id(user_id)
|
return self._repository.list_by_user_id(user_id)
|
||||||
|
|
||||||
|
|||||||
@@ -30,14 +30,14 @@ from app.application.plugin.identity import (
|
|||||||
TrustedPluginSourceType,
|
TrustedPluginSourceType,
|
||||||
normalize_physical_plugin_id,
|
normalize_physical_plugin_id,
|
||||||
)
|
)
|
||||||
|
from app.application.plugin.install import PluginInstallCommand
|
||||||
|
from app.application.plugin.inventory import PluginCandidateInventoryReader
|
||||||
|
from app.application.plugin.lifecycle import PluginStartupLease
|
||||||
from app.application.plugin.migration import (
|
from app.application.plugin.migration import (
|
||||||
PluginIdentityMigrationService,
|
PluginIdentityMigrationService,
|
||||||
configure_plugin_identity_migration,
|
configure_plugin_identity_migration,
|
||||||
get_plugin_identity_migration,
|
get_plugin_identity_migration,
|
||||||
)
|
)
|
||||||
from app.application.plugin.install import PluginInstallCommand
|
|
||||||
from app.application.plugin.inventory import PluginCandidateInventoryReader
|
|
||||||
from app.application.plugin.lifecycle import PluginStartupLease
|
|
||||||
from app.application.plugin.recovery import (
|
from app.application.plugin.recovery import (
|
||||||
PluginInstallationRecoveryService,
|
PluginInstallationRecoveryService,
|
||||||
configure_plugin_installation_recovery,
|
configure_plugin_installation_recovery,
|
||||||
|
|||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"application": {
|
"application": {
|
||||||
"covered_lines": 9649,
|
"covered_lines": 9966,
|
||||||
"percent": 78.24,
|
"percent": 78.61,
|
||||||
"statements": 12333
|
"statements": 12678
|
||||||
},
|
},
|
||||||
"domain": {
|
"domain": {
|
||||||
"covered_lines": 3392,
|
"covered_lines": 3392,
|
||||||
|
|||||||
+1
-4
@@ -956,7 +956,7 @@
|
|||||||
"union-attr": 4
|
"union-attr": 4
|
||||||
},
|
},
|
||||||
"app/api/endpoints/mfa.py": {
|
"app/api/endpoints/mfa.py": {
|
||||||
"attr-defined": 7,
|
"attr-defined": 6,
|
||||||
"call-overload": 1,
|
"call-overload": 1,
|
||||||
"index": 2,
|
"index": 2,
|
||||||
"misc": 17,
|
"misc": 17,
|
||||||
@@ -1279,9 +1279,6 @@
|
|||||||
"app/application/security/passkey.py": {
|
"app/application/security/passkey.py": {
|
||||||
"no-untyped-call": 1
|
"no-untyped-call": 1
|
||||||
},
|
},
|
||||||
"app/application/security/passkeys.py": {
|
|
||||||
"valid-type": 2
|
|
||||||
},
|
|
||||||
"app/application/security/token.py": {
|
"app/application/security/token.py": {
|
||||||
"no-any-return": 3,
|
"no-any-return": 3,
|
||||||
"operator": 1
|
"operator": 1
|
||||||
|
|||||||
@@ -354,9 +354,6 @@
|
|||||||
"app/application/security/auth.py": {
|
"app/application/security/auth.py": {
|
||||||
"I001": 1
|
"I001": 1
|
||||||
},
|
},
|
||||||
"app/application/security/passkey.py": {
|
|
||||||
"I001": 1
|
|
||||||
},
|
|
||||||
"app/application/security/url.py": {
|
"app/application/security/url.py": {
|
||||||
"I001": 1
|
"I001": 1
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user