diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a7ab3b14..a5ae7835 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,8 +10,14 @@ repos: - id: check-yaml - id: check-toml + - repo: https://github.com/tombi-toml/tombi-pre-commit + rev: v0.7.26 + hooks: + - id: tombi-format + args: ["--offline"] + - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.14.13 + rev: v0.15.0 hooks: - id: ruff-check args: @@ -21,7 +27,7 @@ repos: - id: ruff-format - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.9.26 + rev: 0.9.29 hooks: - id: uv-lock - id: uv-export diff --git a/backend/plugin/code_generator/plugin.toml b/backend/plugin/code_generator/plugin.toml index 4fdd8ee3..c4279b52 100644 --- a/backend/plugin/code_generator/plugin.toml +++ b/backend/plugin/code_generator/plugin.toml @@ -1,13 +1,13 @@ [plugin] -summary = '代码生成' -version = '0.1.1' -description = '生成通用业务代码' -author = 'wu-clan' -tags = ['other'] -database = ['mysql', 'postgresql'] +summary = "代码生成" +version = "0.1.1" +description = "生成通用业务代码" +author = "wu-clan" +tags = ["other"] +database = ["mysql", "postgresql"] [app] -router = ['v1'] +router = ["v1"] [settings] -CODE_GENERATOR_DOWNLOAD_ZIP_FILENAME = 'fba_generator' +CODE_GENERATOR_DOWNLOAD_ZIP_FILENAME = "fba_generator" diff --git a/backend/plugin/config/plugin.toml b/backend/plugin/config/plugin.toml index 264fea72..adf7b3b7 100644 --- a/backend/plugin/config/plugin.toml +++ b/backend/plugin/config/plugin.toml @@ -1,14 +1,14 @@ [plugin] -summary = '参数配置' -version = '0.0.2' -description = '通常用于动态配置系统参数和前端工程数据展示' -author = 'wu-clan' -tags = ['other'] -database = ['mysql', 'postgresql'] +summary = "参数配置" +version = "0.0.2" +description = "通常用于动态配置系统参数和前端工程数据展示" +author = "wu-clan" +tags = ["other"] +database = ["mysql", "postgresql"] [app] -extend = 'admin' +extend = "admin" [api.config] -prefix = '/configs' -tags = '系统参数配置' +prefix = "/configs" +tags = "系统参数配置" diff --git a/backend/plugin/dict/plugin.toml b/backend/plugin/dict/plugin.toml index 1ab9b5c7..2e51b8d8 100644 --- a/backend/plugin/dict/plugin.toml +++ b/backend/plugin/dict/plugin.toml @@ -1,18 +1,18 @@ [plugin] -summary = '数据字典' -version = '0.0.8' -description = '通常用于约束前端工程数据展示' -author = 'wu-clan' -tags = ['other'] -database = ['mysql', 'postgresql'] +summary = "数据字典" +version = "0.0.8" +description = "通常用于约束前端工程数据展示" +author = "wu-clan" +tags = ["other"] +database = ["mysql", "postgresql"] [app] -extend = 'admin' +extend = "admin" [api.dict_data] -prefix = '/dict-datas' -tags = '系统字典数据' +prefix = "/dict-datas" +tags = "系统字典数据" [api.dict_type] -prefix = '/dict-types' -tags = '系统字典类型' +prefix = "/dict-types" +tags = "系统字典类型" diff --git a/backend/plugin/email/plugin.toml b/backend/plugin/email/plugin.toml index 58bb3ed8..763b6bea 100644 --- a/backend/plugin/email/plugin.toml +++ b/backend/plugin/email/plugin.toml @@ -1,17 +1,17 @@ [plugin] -summary = '电子邮件' -version = '0.0.3' -description = '提供邮件发送功能,支持验证码、通知等场景' -author = 'wu-clan' -tags = ['other'] -database = ['mysql', 'postgresql'] +summary = "电子邮件" +version = "0.0.3" +description = "提供邮件发送功能,支持验证码、通知等场景" +author = "wu-clan" +tags = ["other"] +database = ["mysql", "postgresql"] [app] -router = ['v1'] +router = ["v1"] [settings] -EMAIL_HOST = 'smtp.qq.com' +EMAIL_HOST = "smtp.qq.com" EMAIL_PORT = 465 EMAIL_SSL = true -EMAIL_CAPTCHA_REDIS_PREFIX = 'fba:email:captcha' +EMAIL_CAPTCHA_REDIS_PREFIX = "fba:email:captcha" EMAIL_CAPTCHA_EXPIRE_SECONDS = 180 # 3 分钟 diff --git a/backend/plugin/notice/plugin.toml b/backend/plugin/notice/plugin.toml index 5a966225..34f6a9e6 100644 --- a/backend/plugin/notice/plugin.toml +++ b/backend/plugin/notice/plugin.toml @@ -1,14 +1,14 @@ [plugin] -summary = '通知公告' -version = '0.0.2' -description = '用于发布系统内部通知、公告' -author = 'wu-clan' -tags = ['other'] -database = ['mysql', 'postgresql'] +summary = "通知公告" +version = "0.0.2" +description = "用于发布系统内部通知、公告" +author = "wu-clan" +tags = ["other"] +database = ["mysql", "postgresql"] [app] -extend = 'admin' +extend = "admin" [api.notice] -prefix = '/notices' -tags = '系统通知公告' +prefix = "/notices" +tags = "系统通知公告" diff --git a/backend/plugin/oauth2/plugin.toml b/backend/plugin/oauth2/plugin.toml index d3d92ee9..eb7693fc 100644 --- a/backend/plugin/oauth2/plugin.toml +++ b/backend/plugin/oauth2/plugin.toml @@ -1,18 +1,18 @@ [plugin] -summary = 'OAuth 2.0' -version = '0.0.11' -description = '支持 GitHub、Google 等社交平台登录' -author = 'wu-clan' -tags = ['auth'] -database = ['mysql', 'postgresql'] +summary = "OAuth 2.0" +version = "0.0.11" +description = "支持 GitHub、Google 等社交平台登录" +author = "wu-clan" +tags = ["auth"] +database = ["mysql", "postgresql"] [app] -router = ['v1'] +router = ["v1"] [settings] -OAUTH2_STATE_REDIS_PREFIX = 'fba:oauth2:state' +OAUTH2_STATE_REDIS_PREFIX = "fba:oauth2:state" OAUTH2_STATE_EXPIRE_SECONDS = 180 # 3 分钟 -OAUTH2_GITHUB_REDIRECT_URI = 'http://127.0.0.1:8000/api/v1/oauth2/github/callback' -OAUTH2_GOOGLE_REDIRECT_URI = 'http://127.0.0.1:8000/api/v1/oauth2/google/callback' -OAUTH2_FRONTEND_LOGIN_REDIRECT_URI = 'http://localhost:5173/oauth2/callback' -OAUTH2_FRONTEND_BINDING_REDIRECT_URI = 'http://localhost:5173/profile' +OAUTH2_GITHUB_REDIRECT_URI = "http://127.0.0.1:8000/api/v1/oauth2/github/callback" +OAUTH2_GOOGLE_REDIRECT_URI = "http://127.0.0.1:8000/api/v1/oauth2/google/callback" +OAUTH2_FRONTEND_LOGIN_REDIRECT_URI = "http://localhost:5173/oauth2/callback" +OAUTH2_FRONTEND_BINDING_REDIRECT_URI = "http://localhost:5173/profile" diff --git a/pyproject.toml b/pyproject.toml index 760612e3..50cb2294 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,7 +101,7 @@ preview = true fix = true unsafe-fixes = true show-fixes = true -required-version = ">=0.13.0" +required-version = ">=0.15.0" [tool.ruff.lint] select = [