pyre-check-nightly

A performant type checker for Python

MIT 109 个版本 Python >=3.8
Facebook <pyre@fb.com>
安装
pip install pyre-check-nightly
poetry add pyre-check-nightly
pipenv install pyre-check-nightly
conda install pyre-check-nightly
描述

tests Gitter

[!IMPORTANT]

New Version is Available

Check out Pyrefly, our next-generation Python typechecker and language server.

Pyre is a performant type checker for Python compliant with PEP 484. Pyre can analyze codebases with millions of lines of code incrementally – providing instantaneous feedback to developers as they write code. You can try it out on examples in the Pyre Playground.

Pyre ships with Pysa, a security focused static analysis tool we've built on top of Pyre that reasons about data flows in Python applications. Please refer to our documentation to get started with our security analysis.

Pysa is also available on the GitHub Marketplace as a Github Action

Requirements

To get started, you need Python 3.8 or later and watchman working on your system. On MacOS you can get everything with homebrew:

$ brew install python3 watchman

On Ubuntu, Mint, or Debian; use apt-get and homebrew:

$ sudo apt-get install python3 python3-pip python3-venv
$ brew install watchman

We tested Pyre on Ubuntu 18.04.5 LTS, CentOS 7, as well as OSX 10.11 and later.

Setting up a Project

We start by creating an empty project directory and setting up a virtual environment:

$ mkdir my_project && cd my_project
$ python3 -m venv ~/.venvs/venv
$ source ~/.venvs/venv/bin/activate
(venv) $ pip install pyre-check

Next, we teach Pyre about our new project:

(venv) $ pyre init

This command will set up a configuration for Pyre (.pyre_configuration) as well as watchman (.watchmanconfig) in your project's directory. Accept the defaults for now – you can change them later if necessary.

Running Pyre

We are now ready to run Pyre:

(venv) $ echo "i: int = 'string'" > test.py
(venv) $ pyre
 ƛ Found 1 type error!
test.py:1:0 Incompatible variable type [9]: i is declared to have type `int` but is used as type `str`.

This first invocation will start a daemon listening for filesystem changes – type checking your project incrementally as you make edits to the code. You will notice that subsequent invocations of pyre will be faster than the first one.

For more detailed documentation, see https://pyre-check.org.

Join the Pyre community

See CONTRIBUTING.md for how to help out.

License

Pyre is licensed under the MIT license.

版本列表
0.0.101757589089 2025-09-11
0.0.101757502732 2025-09-10
0.0.101757416310 2025-09-09
0.0.101756984371 2025-09-04
0.0.101756897943 2025-09-03
0.0.101756811625 2025-09-02
0.0.101756725157 2025-09-01
0.0.101756638704 2025-08-31
0.0.101756552349 2025-08-30
0.0.101756465899 2025-08-29
0.0.101756379607 2025-08-28
0.0.101756293232 2025-08-27
0.0.101756206696 2025-08-26
0.0.101756120284 2025-08-25
0.0.101756033881 2025-08-24
0.0.101755947577 2025-08-23
0.0.101755861200 2025-08-22
0.0.101755774776 2025-08-21
0.0.101755688461 2025-08-20
0.0.101755601965 2025-08-19
0.0.101755515546 2025-08-18
0.0.101755429153 2025-08-17
0.0.101755342697 2025-08-16
0.0.101755256327 2025-08-15
0.0.101755169875 2025-08-14
0.0.101755083580 2025-08-13
0.0.101754997132 2025-08-12
0.0.101754910729 2025-08-11
0.0.101754824350 2025-08-10
0.0.101754737887 2025-08-09
0.0.101754651541 2025-08-08
0.0.101754565103 2025-08-07
0.0.101754478689 2025-08-06
0.0.101754392408 2025-08-05
0.0.101754305937 2025-08-04
0.0.101754219451 2025-08-03
0.0.101754133066 2025-08-02
0.0.101754046721 2025-08-01
0.0.101753960345 2025-07-31
0.0.101753873920 2025-07-30
0.0.101753787727 2025-07-29
0.0.101753701195 2025-07-28
0.0.101753614759 2025-07-27
0.0.101753528359 2025-07-26
0.0.101753442006 2025-07-25
0.0.101753355561 2025-07-24
0.0.101753269135 2025-07-23
0.0.101753182759 2025-07-22
0.0.101753096370 2025-07-21
0.0.101753009953 2025-07-20
0.0.101752923536 2025-07-19
0.0.101752837153 2025-07-18
0.0.101752750826 2025-07-17
0.0.101752664361 2025-07-16
0.0.101752578029 2025-07-15
0.0.101752491607 2025-07-14
0.0.101752405119 2025-07-13
0.0.101752318739 2025-07-12
0.0.101752232391 2025-07-11
0.0.101752146088 2025-07-10
0.0.101752059627 2025-07-09
0.0.101751973282 2025-07-08
0.0.101751886802 2025-07-07
0.0.101751800363 2025-07-06
0.0.101751713939 2025-07-05
0.0.101751627534 2025-07-04
0.0.101751541135 2025-07-03
0.0.101751454780 2025-07-02
0.0.101751368338 2025-07-01
0.0.101751281950 2025-06-30
0.0.101751195541 2025-06-29
0.0.101751109127 2025-06-28
0.0.101751022762 2025-06-27
0.0.101750936314 2025-06-26
0.0.101750849915 2025-06-25
0.0.101750763489 2025-06-24
0.0.101750677081 2025-06-23
0.0.101750590678 2025-06-22
0.0.101750504310 2025-06-21
0.0.101750417884 2025-06-20
0.0.101750331497 2025-06-19
0.0.101750287958 2025-06-18
0.0.101750245115 2025-06-18
0.0.101750238303 2025-06-18
0.0.101750158687 2025-06-17
0.0.101750072268 2025-06-16
0.0.101749985898 2025-06-15
0.0.101749899490 2025-06-14
0.0.101749813434 2025-06-13
0.0.101749813110 2025-06-13
0.0.101749726694 2025-06-12
0.0.101749723805 2025-06-12
0.0.101749640283 2025-06-11
0.0.101749553887 2025-06-10
0.0.101749467524 2025-06-09
0.0.101749381258 2025-06-08
0.0.101749294770 2025-06-07
0.0.101749208302 2025-06-06
0.0.101749121912 2025-06-05
0.0.101749035478 2025-06-04
0.0.101748949156 2025-06-03
0.0.101748862749 2025-06-02
0.0.101748776233 2025-06-01
0.0.101748689898 2025-05-31
0.0.101748603501 2025-05-30
0.0.101748517088 2025-05-29
0.0.101748430693 2025-05-28
0.0.101747912284 2025-05-22
0.0.101747825949 2025-05-21