-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/pyright check #1845
Feature/pyright check #1845
Conversation
审阅者指南 by Sourcery这个拉取请求引入了新的 GitHub 工作流配置,以改进代码质量检查。它添加了 Pyright 类型检查和 Ruff 代码风格检查的工作流,并进一步将这些工作流链接成顺序工作流,以确保在进行类型检查之前先执行代码风格检查。此外,还更新了 VSCode 扩展建议以支持这些新工具。 顺序代码风格检查和类型检查工作流的序列图sequenceDiagram
participant Dev as Developer
participant GH as GitHub Workflow Engine
participant Ruff as Ruff Lint Workflow
participant Pyright as Pyright Lint Workflow
Dev->>GH: 触发 push/pull_request
GH->>Ruff: 启动 Ruff 代码风格检查作业 (ruff-call)
Ruff-->>GH: Ruff 作业完成
GH->>Pyright: 启动 Pyright 类型检查作业 (pyright-call)
Pyright-->>GH: Pyright 作业完成
GH-->>Dev: 代码风格检查和类型检查反馈
文件级变更
提示和命令与 Sourcery 交互
自定义你的体验访问你的仪表板以:
获取帮助Original review guide in EnglishReviewer's Guide by SourceryThis pull request introduces new GitHub workflow configurations to improve code quality checks. It adds workflows for Pyright type checking and Ruff linting, and further chains these in a sequential workflow to ensure that linting is performed before type checks. Additionally, there is an update to VSCode extension recommendations to support these new tools. Sequence diagram for sequential lint and type check workflowsequenceDiagram
participant Dev as Developer
participant GH as GitHub Workflow Engine
participant Ruff as Ruff Lint Workflow
participant Pyright as Pyright Lint Workflow
Dev->>GH: Trigger push/pull_request
GH->>Ruff: Start Ruff Lint Job (ruff-call)
Ruff-->>GH: Ruff Job Complete
GH->>Pyright: Start Pyright Lint Job (pyright-call)
Pyright-->>GH: Pyright Job Complete
GH-->>Dev: Feedback on Lint & Type Check
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
你现在的pyright action并没有进到你的环境里面导致ci爆掉 |
@sourcery-ai review |
Hi @BalconyJH! 👋 Only authors and team members can run @sourcery-ai commands on public repos. |
.github/workflows/pyright.yml
Outdated
on: | ||
workflow_call: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
paths: | ||
- "zhenxun/**" | ||
- "tests/**" | ||
- ".github/workflows/pyright.yml" | ||
- "pyproject.toml" | ||
- "poetry.lock" | ||
workflow_dispatch: | ||
inputs: | ||
python-version: | ||
description: "Python version" | ||
required: false | ||
type: choice | ||
options: | ||
- "all" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
default: "all" | ||
debug-mode: | ||
description: "enable debug mode" | ||
required: false | ||
type: boolean | ||
default: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里改成只被workflow_call和手动触发吧,现在重复触发了
.github/workflows/ruff.yml
Outdated
on: | ||
workflow_call: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
paths: | ||
- "zhenxun/**" | ||
- "tests/**" | ||
- ".github/workflows/ruff.yml" | ||
- "pyproject.toml" | ||
- "poetry.lock" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里也是重复触发了
.github/workflows/ruff.yml
Outdated
- name: Run Ruff Format | ||
run: ruff format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删掉格式化,仅检查
No description provided.