diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 889f3be..2832077 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,18 +20,18 @@ repos: - id: end-of-file-fixer - repo: https://github.com/renovatebot/pre-commit-hooks - rev: 43.216.1 + rev: 44.168.2 hooks: - id: renovate-config-validator files: renovate.json - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.11.19 + rev: 0.13.1 hooks: - id: uv-lock - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.16 + rev: v0.17.1 hooks: - id: ruff types_or: [python, pyi] @@ -40,6 +40,6 @@ repos: types_or: [python, pyi] - repo: https://github.com/opensource-nepal/commitlint - rev: v1.13.3 + rev: v2.0.0 hooks: - id: commitlint diff --git a/src/submit/submit.py b/src/submit/submit.py index fc2e42c..40f6417 100644 --- a/src/submit/submit.py +++ b/src/submit/submit.py @@ -1,12 +1,10 @@ # author: @Snoopy1866 import re - from dataclasses import dataclass from pathlib import Path import click - from natsort import index_natsorted SYLBOMS = r"[\s\*\-\=]" @@ -50,7 +48,7 @@ def _cut_code( substitute (dict[str, str], optional): 宏变量替换字典。 """ - re_flags = re.I | re.S + re_flags = re.IGNORECASE | re.DOTALL code = file.read_text(encoding=encoding) @@ -102,7 +100,6 @@ def _copy_file(sas_file: Path, txt_file: Path, positive: bool, negative: bool, s @click.group() def cli() -> None: """sas 代码裁剪工具""" - pass @cli.command(name="copyfile", help="处理单个 sas 文件,保存处理后的代码到 txt 文件中。")