pyre-check
algoneer
Our great sponsors
pyre-check | algoneer | |
---|---|---|
23 | 1 | |
6,659 | 15 | |
0.8% | - | |
9.9 | 0.0 | |
8 days ago | about 3 years ago | |
OCaml | Python | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pyre-check
-
Enhance Your Project Quality with These Top Python Libraries
Pyre is a performant type-checker developed by Facebook. Pyre can analyse codebases with millions of lines of code incrementally – providing instantaneous feedback to developers as they write code.
-
A Tale of Two Kitchens - Hypermodernizing Your Python Code Base
Pyre from Meta, pyright from Microsoft and PyType from Google provide additional assistance. They can 'infer' types based on code flow and existing types within the code.
-
Ruff v0.1.0
Have you seen Pyre[0]? Not Rust, OCaml, and pretty fast. Made by a team at Meta and open sourced on GitHub. If you use python-lsp, I wrote an extension[1] to enable integration (though I haven't tested it recently, been programming in rust; it is mostly a "for me" extension).
- Should I Rust or should I Go
- Writing Python like it's Rust
-
Buck2, a large scale build tool written in Rust by Meta, is now available
Internally we use Pyre for Python type checking: https://github.com/facebook/pyre-check
- Are there any sectors that use Haskell as a main programming language?
-
It is becoming difficult for me to be productive in Python
Before type hinting, work had intense rules and linters enforcing docstrings with types. Now, type hints and automatic pyre runs take care of all the heavy lifting.
-
Ruby 3.2’s YJIT is Production-Ready
Python now has an optional type system and if you add one of them such as mypy or pyre to your CI process and you can configure GitHub to refuse the pull request until types are added you can make it somewhat strongly typed.
If you have a preexisting codebase I believe the way you can convert it is to add the types that you know on commits and eventually you will have enough types that adding the missing ones should be easy. For the missing ones Any is a good choice.
https://pyre-check.org and https://github.com/python/mypy are popular.
-
Is there any other mainstream language (especially strongly typed compiled) whose type system is as powerful (or at least close) as Typescript? It's difficult to like other languages type system after using Typescript.
So to find things in a similar space, you need to look for languages with these sorts of constraints - so things like Sorbet for Ruby or pyright/pyre and you'll see similar and new ideas
algoneer
-
Adoption of Mypy for Python type checking: 45% already use it, 40% don't plan to
I gave a presentation on type checking at the EuroPython 2017 where I also investigated how many Python projects really use type checking, I present the results at the end (35 minutes in):
https://www.youtube.com/watch?v=vM2Zoy4Sxhk&t=2181s
My conclusion was that only a small fraction of projects really used them, there were a lot of projects that had type checks in their code but only in "homeopathic" doses.
I started using them for some of my Python projects as well (e.g https://github.com/algoneer/algoneer) and while I find them useful I think they're not as useful as a "real" type system in a fully typed language like Golang. Still, they're very useful for discovering simple mistakes that would only show up in unit testing otherwise.
You can also "misuse" them for other purposes, at the end of the presentation I e.g. show how you can implement software contracts with them. Of course this would wreck a type checker like mypy, so don't do that in your codebase. That's probably also one of my critiques as the annotation syntax can in principle be used for anything, but mypy and other tools are not able to deal with code that does that.
What are some alternatives?
pyright - Static Type Checker for Python
mypy - Optional static typing for Python
pytype - A static type analyzer for Python code
typeshed - Collection of library stubs for Python, with static types
flake8
ParlAI - A framework for training and evaluating AI models on a variety of openly available dialogue datasets.
typing - Python static typing home. Hosts the documentation and a user help forum.
psst - Fast and multi-platform Spotify client with native GUI
mamba - The Fast Cross-Platform Package Manager
isort - A Python utility / library to sort imports.
ncspot - Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes.
semgrep-rules - Semgrep rules registry