Skip to content

[Code scan] Pyright workflow runs ty instead of pyright #618

Description

@njzjz

Found by a Codex global repository scan of deepmodeling/dpdispatcher at commit 98a9e08.

Problem
The type-checking workflow is named and job-labeled as Pyright, but it runs ty check instead of the configured Pyright checker.

Relevant code

name: Type checker
jobs:
test:
name: pyright
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
- run: uvx --from ty==0.0.17 --with .[cloudserver,gui] --with tomli ty check

[tool.pyright]
include = ['dpdispatcher']
exclude = [
'dpdispatcher/dpcloudserver/temp_test.py',
'dpdispatcher/_version.py',
]

Impact
Maintainers following the development guide and CI are running different type checkers. A change can pass the workflow while still failing pyright, or the workflow can fail for a ty-specific reason while being reported as Pyright.

Suggested fix
Either run pyright in this workflow, or rename the workflow/job to ty and add a separate Pyright job that uses the [tool.pyright] configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggithub_actionsPull requests that update GitHub Actions code

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions