pyright README

The project's README from github.com/microsoft/pyright. As one markdown file: README.md.

Pyright

Static Type Checker for Python

Pyright is a full-featured, standards-based static type checker for Python. It is designed for high performance and can be used with large Python source bases.

Pyright includes both a command-line tool and an extension for Visual Studio Code.

Pyright Playground

Try Pyright in your browser using the Pyright Playground.

Documentation

Refer to the documentation for installation, configuration, and usage details.

Environment variables

If Pyright fails to create a temporary directory (for example in remote/server environments where the OS temp directory doesn't exist or isn't writable), you can override the temp directory root:

Pyright otherwise relies on the platform temp directory (for example TMPDIR, TMP, TEMP, or the OS default).

Community

Do you have questions about Pyright or Python type annotations in general? Post your questions in the discussion section.

If you would like to report a bug or request an enhancement, file a new issue in either the pyright or pylance-release issue tracker. In general, core type checking functionality is associated with Pyright while language service functionality is associated with Pylance, but the same contributors monitor both repos. For best results, provide the information requested in the issue template.

Contributing

This project welcomes contributions and suggestions. For feature and complex bug fix contributions, it is recommended that you first discuss the proposed change with Pyright’s maintainers before submitting the pull request. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

pyright (microsoft/pyright)

Searching Database…

15.7K ·GitHub
Что это такое?Pyright — это полноценный статический анализатор типов для Python, основанный на стандартах и созданный Microsoft, чтобы быстро работать даже на больших кодовых базах.
Это утилита для командной строки, расширение для редактора или и то и другое?И то и другое: он распространяется как утилита командной строки и как расширение для Visual Studio Code, а ещё есть браузерный Playground для быстрых проб.
Как его запустить?README отсылает к документации проекта — там описаны установка, настройка и использование; а чтобы попробовать без установки, есть Pyright Playground, который работает прямо в браузере.
Он написан на Python, как и код, который проверяет?Нет — несмотря на то что Pyright проверяет код на Python, сам он написан на TypeScript: этот репозиторий собирается с помощью pnpm, lerna и webpack на инструментах Node.js.
Есть ли особенности, о которых стоит знать, например на серверах или в контейнерах?В удалённых/серверных окружениях, где системная временная папка не существует или недоступна для записи, задайте переменную окружения PYRIGHTTMPDIR с абсолютным путём — Pyright сам её создаст и будет использовать для временных файлов.
Он справится с большой кодовой базой?Да — производительность была одной из целей при проектировании, и Pyright специально создавался для работы с крупными исходниками на Python.
На каких платформах он работает?CLI и расширение для VS Code работают на Windows, macOS и Linux, так что покрывают обычные наборы разработчика независимо от ОС.
Чем отличается Pyright от Pylance?Базовая функциональность проверки типов относится к Pyright, а функциональность языкового сервиса — к Pylance; одни и те же контрибьюторы следят за обоими репозиториями, поэтому ишью можно заводить в любом из них.
Можно попробовать без установки чего-либо?Да — Pyright Playground работает прямо в браузере, так что вы можете поэкспериментировать с проверкой типов, прежде чем ставить CLI или расширение для VS Code.
Обязательно ли пользоваться VS Code, чтобы получить от него пользу?Нет — утилита командной строки работает сама по себе в любом терминале, локально или в CI; расширение для VS Code лишь добавляет удобство работы прямо в редакторе.
What are similar projects?mypy, fallow, rector, ruff, infer, semgrep, TypeScript, standard
Creator
microsoft
Size
135.8 MB
Stars
15.7K
Age
7y
Commits · 90 Days