{"repo":"RobertCraigie/pyright-python","free":true,"listed":false,"github":"https://github.com/RobertCraigie/pyright-python","clone":"git clone https://github.com/RobertCraigie/pyright-python.git","description":"Python command line wrapper for pyright, a static type checker","language":"Python","stars":274,"topics":["python","pip","typechecking","cli"],"license":"MIT","category":"cli-tools","readme_excerpt":"Pyright for Python This project is not affiliated with Microsoft in any way, shape, or form Pyright for Python is a Python command-line wrapper over pyright, a static type checker for Python. Installation Use the package manager pip to install pyright. [!TIP] It's highly recommended to install pyright with the nodejs extra which uses nodejs-wheel to download Node.js binaries as it is more reliable than the default nodeenv solution. Usage Pyright can be invoked using two different methods or Pyright for Python should work exactly the same as pyright does, see the pyright documentation for details on how to make use of pyright. Pre-commit You can also setup pyright to run automatically before each commit by setting up pre-commit and registering pyright in your .pre-commit-config.yaml file Pre-commit will install pyright-python in its own virtual environment which can cause pyright to not be able to detect your installed dependencies. To fix this you can either tell pre-commit to also install those dependencies or explicitly tell pyright which virtual environment to use by updating your pyright configuration file: Motivation Pyright is written in TypeScript, requiring node to be installed, and is normally installed with npm. This could be an entry barrier for some Python developers as they may not have node or npm installed on their machine; I wanted to make pyright as easy to install as any normal Python package. How Pyright for Python Works This project works by first checking","default_branch":null,"files":null,"tree":[],"storefront":"/r/RobertCraigie","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/RobertCraigie/pyright-python/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}