chore: make style, upgrade deps, fix ci error and update changelog

This commit is contained in:
Waket Zheng
2024-11-25 23:46:48 +08:00
parent 095eb48196
commit dc020358b6
12 changed files with 496 additions and 434 deletions

View File

@@ -75,7 +75,7 @@ class Product(Model):
class Config(Model):
label = fields.CharField(max_length=200)
key = fields.CharField(max_length=20)
value = fields.JSONField()
value: dict = fields.JSONField()
status: Status = fields.IntEnumField(Status)
user: fields.ForeignKeyRelation[User] = fields.ForeignKeyField(
"models.User", description="User"

View File

@@ -67,5 +67,5 @@ class Product(Model):
class Config(Model):
label = fields.CharField(max_length=200)
key = fields.CharField(max_length=20)
value = fields.JSONField()
value: dict = fields.JSONField()
status: Status = fields.IntEnumField(Status, default=Status.on)

View File

@@ -66,7 +66,7 @@ class Product(Model):
class Config(Model):
label = fields.CharField(max_length=200)
key = fields.CharField(max_length=20)
value = fields.JSONField()
value: dict = fields.JSONField()
status: Status = fields.IntEnumField(Status, default=Status.on)
class Meta:

View File

@@ -819,7 +819,7 @@ def test_migrate(mocker: MockerFixture):
- alter default: Config.status
- rename column: Product.image -> Product.pic
"""
mocker.patch("click.prompt", side_effect=(True,))
mocker.patch("asyncclick.prompt", side_effect=(True,))
models_describe = get_models_describe("models")
Migrate.app = "models"