跳到正文
TakoAPI
返回技能列表

pyright-lsp

由 bowen31337 提供

Coding Agents & IDEs
895下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Python language server (Pyright) providing static type checking, code intelligence, and LSP diagnostics for .py and .

描述

该技能的功能

Pyright is Microsoft's Python language server that runs static type checking and code intelligence on .py and .pyi files. It detects type errors, provides autocomplete suggestions, and supports go-to-definition and find references.

Pyright is faster and more precise than mypy for type inference, making it practical for large or complex Python projects.

何时使用

  • Catching type mismatches before running Python scripts
  • Navigating large Python codebases with go-to-definition
  • Validating type annotations in a library or package
  • Running type checks in CI to catch regressions
  • Getting autocomplete and error feedback without a full IDE

示例工作流

输入

User asks: Check my Python project for type errors

智能体
  1. 1

    Navigate to the project root directory

  2. 2

    Run pyright to analyze all Python files

  3. 3

    Parse the diagnostic output for errors and warnings

  4. 4

    Report each type error with file path, line number, and description

输出

A list of type errors and warnings with locations, ready to address before committing

前置要求

  • Pyright installed via npm (`npm install -g pyright`), pip (`pip install pyright`), or pipx (`pipx install pyright`)

安装

clawhub install bowen31337/pyright-lsp

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接