From 546b2ecc8fabd6d3bd970dad86f72b0fb19d76a4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 21:12:36 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit: v4.6.0 → v4.7.0](https://github.com/pre-commit/pre-commit/compare/v4.6.0...v4.7.0) - [github.com/astral-sh/ruff-pre-commit: v0.15.16 → v0.17.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.16...v0.17.5) - [github.com/astral-sh/uv-pre-commit: 0.11.19 → 0.13.8](https://github.com/astral-sh/uv-pre-commit/compare/0.11.19...0.13.8) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ba9e8cd..2f7bff0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,12 +14,12 @@ repos: - id: check-docstring-first - repo: https://github.com/pre-commit/pre-commit - rev: v4.6.0 + rev: v4.7.0 hooks: - id: validate_manifest - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.16 + rev: v0.17.5 hooks: - id: ruff args: [ --fix, --config=./pyproject.toml ] @@ -28,6 +28,6 @@ repos: - repo: https://github.com/astral-sh/uv-pre-commit # uv version. - rev: 0.11.19 + rev: 0.13.8 hooks: - id: uv-lock From 711bea743e109c722f62563842c067f09e95ef1c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 21:12:47 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.md | 2 +- docs/quickstart.md | 2 +- docs/quickstart.zh.md | 2 +- docs/use-cases/others.md | 16 ++++++++++------ docs/use-cases/others.zh.md | 10 ++++------ 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 0d5b6ff..439c3fc 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Name: {g.person_name(name="name")} Email: {g.e_mail(name="email")}""" result = model(query, use_gim_prompt=True) -result.tags["name"].content # → "John Smith" +result.tags["name"].content # → "John Smith" result.tags["email"].content # → "john@gmail.com" ``` diff --git a/docs/quickstart.md b/docs/quickstart.md index 7a09f7d..928c0a3 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -39,7 +39,7 @@ result = model(query, use_gim_prompt=True) ## 4. Access results ```python -print(result.tags["name"].content) # e.g. Alice +print(result.tags["name"].content) # e.g. Alice print(result.tags["email"].content) # e.g. alice@example.com print(result.tags["color"].content) # red | green | blue ``` diff --git a/docs/quickstart.zh.md b/docs/quickstart.zh.md index deaeeb1..ba9c6e5 100644 --- a/docs/quickstart.zh.md +++ b/docs/quickstart.zh.md @@ -39,7 +39,7 @@ result = model(query, use_gim_prompt=True) ## 4. 访问结果 ```python -print(result.tags["name"].content) # 例如 Alice +print(result.tags["name"].content) # 例如 Alice print(result.tags["email"].content) # 例如 alice@example.com print(result.tags["color"].content) # red | green | blue ``` diff --git a/docs/use-cases/others.md b/docs/use-cases/others.md index f23d7b6..f98fd54 100644 --- a/docs/use-cases/others.md +++ b/docs/use-cases/others.md @@ -5,7 +5,9 @@ These examples are practical domain use cases beyond classic IE tasks. ## Resume and CV Parsing ```python -text = "Dr. Sarah Chen, PhD in Computer Science from MIT. 10 years of experience in machine learning." +text = ( + "Dr. Sarah Chen, PhD in Computer Science from MIT. 10 years of experience in machine learning." +) query = f"""Parse the resume information: @@ -23,7 +25,9 @@ result = model(query, use_gim_prompt=True) ## Product Review Extraction ```python -text = "The iPhone 15 Pro costs $999. It has an amazing camera but the battery life could be better." +text = ( + "The iPhone 15 Pro costs $999. It has an amazing camera but the battery life could be better." +) query = f"""Extract product review information: @@ -57,7 +61,7 @@ result = model(query, use_gim_prompt=True) ```python question = """24 = 24 {} 24 {} 24 {} 0""".format( - *[g(desc="a single math operator") for _ in range(3)] + *[g(desc="a single math operator") for _ in range(3)] ) result = model(question, use_gim_prompt=True) @@ -115,9 +119,9 @@ result = model(question, use_gim_prompt=True) ```python question = "On a screen, mixing #{} and #{} results in the color #{}.".format( - g(desc="Hex color of Red", regex=r"[0-9a-fA-F]{6}"), - g(desc="Hex color of Green", regex=r"[0-9a-fA-F]{6}"), - g(desc="Hex color after mixing", regex=r"[0-9a-fA-F]{6}"), + g(desc="Hex color of Red", regex=r"[0-9a-fA-F]{6}"), + g(desc="Hex color of Green", regex=r"[0-9a-fA-F]{6}"), + g(desc="Hex color after mixing", regex=r"[0-9a-fA-F]{6}"), ) result = model(question, use_gim_prompt=True) diff --git a/docs/use-cases/others.zh.md b/docs/use-cases/others.zh.md index 1f2d985..9ce0be2 100644 --- a/docs/use-cases/others.zh.md +++ b/docs/use-cases/others.zh.md @@ -56,9 +56,7 @@ result = model(query, use_gim_prompt=True) ## 24 点问答 ```python -question = """24 = 24 {} 24 {} 24 {} 0""".format( - *[g(desc="一个数学运算符") for _ in range(3)] -) +question = """24 = 24 {} 24 {} 24 {} 0""".format(*[g(desc="一个数学运算符") for _ in range(3)]) result = model(question, use_gim_prompt=True) ``` @@ -115,9 +113,9 @@ result = model(question, use_gim_prompt=True) ```python question = "On a screen, mixing #{} and #{} results in the color #{}.".format( - g(desc="红色十六进制色值", regex=r"[0-9a-fA-F]{6}"), - g(desc="绿色十六进制色值", regex=r"[0-9a-fA-F]{6}"), - g(desc="混合后的十六进制色值", regex=r"[0-9a-fA-F]{6}"), + g(desc="红色十六进制色值", regex=r"[0-9a-fA-F]{6}"), + g(desc="绿色十六进制色值", regex=r"[0-9a-fA-F]{6}"), + g(desc="混合后的十六进制色值", regex=r"[0-9a-fA-F]{6}"), ) result = model(question, use_gim_prompt=True)