mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-21 14:43:07 +00:00
ci(infra): fix
This commit is contained in:
@@ -13,9 +13,9 @@ from typing import List, Tuple
|
||||
# RST patterns to detect (pattern, description)
|
||||
RST_PATTERNS: List[Tuple[str, str]] = [
|
||||
(r"\.\.\s+code-block::", "RST code-block directive (use ```language instead)"),
|
||||
(r":func:`", "RST :func: role (use regular Markdown links)"),
|
||||
(r":class:`", "RST :class: role (use regular Markdown links)"),
|
||||
(r":meth:`", "RST :meth: role (use regular Markdown links)"),
|
||||
(r":func:", "RST :func: role (use regular Markdown links)"),
|
||||
(r":class:", "RST :class: role (use regular Markdown links)"),
|
||||
(r":meth:", "RST :meth: role (use regular Markdown links)"),
|
||||
(
|
||||
r"\.\.\s+deprecated::",
|
||||
"RST deprecated directive (use !!! deprecated admonition)",
|
||||
@@ -29,7 +29,7 @@ RST_PATTERNS: List[Tuple[str, str]] = [
|
||||
(r"\.\.\s+warning::", "RST warning directive (use !!! warning admonition)"),
|
||||
(r"\.\.\s+important::", "RST important directive (use !!! important admonition)"),
|
||||
(r"\.\.\s+note::", "RST note directive (use !!! note admonition)"),
|
||||
(r":private:`", "RST :private: role (prefix name with underscore instead)"),
|
||||
(r":private:", "RST :private: role (prefix name with underscore instead)"),
|
||||
(r"`[^`]+<[^>]+>`__", "RST anonymous hyperlink (use [text](link) instead)"),
|
||||
(r"`[^`]+<[^>]+>`_", "RST named hyperlink (use [text](link) instead)"),
|
||||
]
|
||||
3
.github/workflows/check_rst_syntax.yml
vendored
3
.github/workflows/check_rst_syntax.yml
vendored
@@ -40,13 +40,14 @@ jobs:
|
||||
uses: tj-actions/changed-files@v47
|
||||
with:
|
||||
files: "**/*.py"
|
||||
files_ignore: ".github/scripts/check_rst_syntax.py"
|
||||
|
||||
- name: "🔍 Check for RST Syntax in Changed Files"
|
||||
if: steps.changed-files.outputs.any_changed == 'true'
|
||||
run: |
|
||||
echo "Checking the following files for RST syntax:"
|
||||
echo "${{ steps.changed-files.outputs.all_changed_files }}"
|
||||
python scripts/check_rst_syntax.py ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
python .github/scripts/check_rst_syntax.py ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
|
||||
- name: "✅ No RST Syntax Detected"
|
||||
if: steps.changed-files.outputs.any_changed != 'true'
|
||||
|
||||
Reference in New Issue
Block a user