GitShow/facebook/pyrefly
facebook

pyrefly

A fast type checker and language server for Python

by facebook
code-qualityidelanguage-serverlanguage-server-protocollsppythonrusttype-annotations
Star on GitHubForkWebsite

Rust

6.7k stars426 forks278 contributorsActive · 3h agoSince 20251.1.1MIT

Meet the team

See all 278 on GitHub →
stroxler
stroxler2.3k contributions
ndmitchell
ndmitchell2.3k contributions
rchen152
rchen1522.3k contributions
yangdanny97
yangdanny97954 contributions
kinto0
kinto0733 contributions
migeed-z
migeed-z729 contributions
grievejia
grievejia608 contributions
connernilsen
connernilsen604 contributions

Languages

View on GitHub →
Rust80.3%
Python15%
MDX2.3%
TypeScript2%
Shell0.2%
CSS0.1%
Other0.2%

Commit activity

Last 12 weeks · 1614 commits

Full graph →

Community health

5 of 6 standards met

Community profile →
87
✓README✓License✓Contributing✓Code of Conduct○Issue Template✓PR Template

Recent PRs & issues

Active · Last activity 3h ago
See all on GitHub →
alexander-beedie
Cache `cwd` path absolutization via `once_cell_cache` feature for a large increase in effective parallelismOpenPR

For a one-line/no-code update this unlocks a _lot_ of extra speed/parallelism 😄 Example: and now type-check ~35% faster on my machine 🚀 I think this _might_ also positively impact #3993 by reducing syscalls (these are likely not a big contributor though), so would be marginally additive to https://github.com/facebook/pyrefly/pull/3994. Summary Overview Profiling across the corpus showed syscalls eating a surprising amount of CPU. The trait delegates to the crate, which calls on every , even for already-absolute paths. A project absolutizes once per module (plus per glob/config site), so a large one can issue thousands of unnecessary syscalls per run. This is especially damaging under parallelism: is a process-global syscall that contends across threads, so the cost/impact grows with thread count. Solution Enabling 's "once_cell_cache" feature resolves the just once, via a thread-safe cell, and reuses it. _This completely eliminates the parallel contention without touching any code_. Test Plan No type-checking logic (or actual code!) was changed. All test results are identical before/after. Benchmarks[^1] Timed single-threaded and multithreaded . Tested across ~60 of the projects. = how many modules are in the project. = pyrefly on main branch. = main + this PR. Results below omit trivially-sized or very fast running-projects. Time in seconds, min of 4 runs after warmup. [^1]: Test machine: Apple Silicon M3 Max.

alexander-beedie · 22m ago
jorenham
Don't merge nested functions into module-level ones in `pyrefly coverage`OpenPR

Summary Fixes #4018 Test Plan Regression test added

jorenham · 36m ago
asukaminato0721
fix support on hover for += and so on #4005OpenPR

Summary Fixes #4005 added augmented-assignment operator-region detection and definition/type lookup for +=. wired augmented-assignment operator type lookup into hover. Test Plan added regression coverage for hover and verified RHS literal hover is preserved.

asukaminato0721 · 49m ago

Recent fixes

View closed PRs →
maggiemoss
Attribute narrowing with optional valueClosedIssue

Describe the Bug Sandbox Link https://pyrefly.org/sandbox/?code=CYUwZgBAjgriDOAXAlgewHYAoCUEC0AfBAEaqoA2AXAFAR0QBOIiMD6EAKg3NbwMbkAhvHgQAgjXoRBDAOaUIydIggAfCADkMICLyVIIAXnE5qAYmnFRyUeVSDgJEDKWzq%2BxADoZso5fiYSoiYAAzY2HqQsAgoGDiS9BbwIDrEAJ6IIHyooBDwyABeOtkAtiUgyorsiAAWOoJWFDCZEABWMCUADhB8wvWkAG4gtPQe3nIQANTGAExAA&version=3.12 (Only applicable for extension issues) IDE Information _No response_

maggiemoss · 49m ago
Structured data for AI agents

Repository: facebook/pyrefly. Description: A fast type checker and language server for Python Stars: 6731, Forks: 426. Primary language: Rust. Languages: Rust (80.3%), Python (15%), MDX (2.3%), TypeScript (2%), Shell (0.2%). License: MIT. Homepage: http://pyrefly.org/ Topics: code-quality, ide, language-server, language-server-protocol, lsp, python, rust, type-annotations, type-check, type-checker, type-hints, typecheck, typechecker, typechecking, types, typing, vscode-extension. Latest release: 1.1.1 (1w ago). Open PRs: 100, open issues: 618. Last activity: 3h ago. Community health: 87%. Top contributors: stroxler, ndmitchell, rchen152, yangdanny97, kinto0, migeed-z, grievejia, connernilsen, samwgoldman, dluo and others.

·@ofershap

Replace github.com with gitshow.dev