Static Code Analysis
Check Python types with a selected Pyrefly preset
pyrefly-check is a Python type-checking node with fixed Pyrefly configuration.
overview
What pyrefly-check does
Type-check Python source with Meta's Pyrefly and emit its native JSON error report. Fixed configuration with a selectable preset; project configs are ignored and no code is executed.
Check .py and .pyi files with Pyrefly 1.3.2 and return native JSON errors containing name, code, severity, description, relative path and start/stop positions. Type errors are successful data; runtime failures or an unreadable report fail without output.
The node copies source into a temporary folder and uses a fixed configuration. Project pyrefly.toml and pyproject.toml tool.pyrefly settings are ignored because they can name an executable interpreter. Presets are basic, legacy, default, strict and all. Limits are 50 MiB, 5000 entries and 300 seconds. Only the image Python 3.11 standard library and bundled stubs resolve; third-party imports can be missing.
Packaged version: 1.3.2. Upstream license: MIT.
source github.com/facebook/pyrefly/tree/e46f4f2c8f271bc3d1bdd7522095f07c0060a3c2
use cases
Where pyrefly-check fits
Locate incompatible returns
Receive source positions for values that conflict with return annotations.
Choose a severity preset
Use the exposed preset input instead of project configuration.
Check copied source consistently
Analyze a folder without executing a configured project interpreter.
reference
pyrefly-check inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| source | FOLDER | --source | Folder of Python source (.py/.pyi); maximum 50 MiB and 5000 entries. Only the standard library and Pyrefly's bundled stubs resolve. |
| preset | STRING | --preset | basic, legacy, default (default), strict or all. |
Showing key inputs. pyrefly-check exposes 2 inputs in total.
example
Run pyrefly-check
python3 /app/run.py --source ./source ./outputguidance
Choosing pyrefly-check
Use pyrefly-check when a fixed configuration and selectable severity preset suit the review. Basic suppresses checks such as return and argument types. Ty-check respects repository ty configuration; this node intentionally ignores project Pyrefly settings. Neither node installs dependencies or runs the project.
faq
pyrefly-check questions
related
More Static Code Analysis tools
bandit
Python source in, JSON security findings out.
gitleaks
Detect hardcoded secrets in git repos and plain directories.
gosec
Go AST security scanner for credentials, crypto, and injection.
guarddog
A package coordinate in, indicator hits out.
malcontent-scan
A package coordinate in, behavior findings out.
osv-malicious
A package coordinate in, malware advisory rows out.
Run pyrefly-check yourself
The saved default-preset verifier confirmed bad-return at typed.py line 2 and bad-argument-type at line 4. These are saved verifier values, not a retained complete native errors report. The command shows the container entrypoint with example paths.
Facts on this page come from the live Trickest tool library.