diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d0eed44b..706d5511 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,13 +2,12 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: -# - id: check-added-large-files -# - id: end-of-file-fixer + - id: end-of-file-fixer - id: check-yaml - id: check-toml - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.12.11 + rev: v0.13.2 hooks: - id: ruff args: @@ -20,7 +19,7 @@ repos: - id: ruff-format - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.8.14 + rev: 0.8.22 hooks: - id: uv-lock - id: uv-export diff --git a/backend/cli.py b/backend/cli.py index 346b1fcd..468c3b95 100644 --- a/backend/cli.py +++ b/backend/cli.py @@ -148,11 +148,7 @@ async def import_table( raise cappa.Exit(e.msg if isinstance(e, BaseExceptionMixin) else str(e), code=1) -def generate(gen: bool) -> None: - if not gen: - console.print(output_help) - return - +def generate() -> None: try: ids = [] results = run_await(gen_business_service.get_all)() @@ -311,14 +307,10 @@ class Import: @cappa.command(name='codegen', help='代码生成(体验完整功能,请自行部署 fba vben 前端工程)', default_long=True) @dataclass class CodeGenerate: - gen: Annotated[ - bool, - cappa.Arg(default=False, show_default=False, help='执行代码生成'), - ] subcmd: cappa.Subcommands[Import | None] = None def __call__(self): - generate(self.gen) + generate() @cappa.command(help='一个高效的 fba 命令行界面', default_long=True) diff --git a/backend/plugin/dict/sql/mysql/init.sql b/backend/plugin/dict/sql/mysql/init.sql index 4e705bdc..d562b63a 100644 --- a/backend/plugin/dict/sql/mysql/init.sql +++ b/backend/plugin/dict/sql/mysql/init.sql @@ -50,4 +50,4 @@ values (33, 'user_online_status', '离线', '0', 'warning', 1, 1, '用户离线状态', 11, now(), null), (34, 'user_online_status', '在线', '1', 'success', 2, 1, '用户在线状态', 11, now(), null), (35, 'sys_plugin_type', '压缩包', '0', 'gold', 1, 1, '插件类型-压缩包', 12, now(), null), -(36, 'sys_plugin_type', 'GIT', '1', 'processing', 2, 1, '插件类型-GIT', 12, now(), null); \ No newline at end of file +(36, 'sys_plugin_type', 'GIT', '1', 'processing', 2, 1, '插件类型-GIT', 12, now(), null);