mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-05-16 13:55:28 +08:00
fix noqa
This commit is contained in:
@@ -351,7 +351,7 @@ class Settings(BaseSettings, ConfigModel, LogConfigModel):
|
|||||||
return default, True
|
return default, True
|
||||||
|
|
||||||
@validator('*', pre=True, always=True)
|
@validator('*', pre=True, always=True)
|
||||||
def generic_type_validator(cls, value: Any, field):
|
def generic_type_validator(cls, value: Any, field): # noqa
|
||||||
"""
|
"""
|
||||||
通用校验器,尝试将配置值转换为期望的类型
|
通用校验器,尝试将配置值转换为期望的类型
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class AuthCredentials(ChainEventData):
|
|||||||
service: Optional[str] = Field(default=None, description="服务名称")
|
service: Optional[str] = Field(default=None, description="服务名称")
|
||||||
|
|
||||||
@root_validator(pre=True)
|
@root_validator(pre=True)
|
||||||
def check_fields_based_on_grant_type(cls, values):
|
def check_fields_based_on_grant_type(cls, values): # noqa
|
||||||
grant_type = values.get("grant_type")
|
grant_type = values.get("grant_type")
|
||||||
if not grant_type:
|
if not grant_type:
|
||||||
values["grant_type"] = "password"
|
values["grant_type"] = "password"
|
||||||
|
|||||||
Reference in New Issue
Block a user