Updated Oct 19, 2026

Static Code Analysis

Check Python types with a selected Pyrefly preset

pyrefly-check is a Python type-checking node with fixed Pyrefly configuration.

Agent

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

2 inputs
NameTypeFlagDescription
sourceFOLDER--sourceFolder of Python source (.py/.pyi); maximum 50 MiB and 5000 entries. Only the standard library and Pyrefly's bundled stubs resolve.
presetSTRING--presetbasic, legacy, default (default), strict or all.

Showing key inputs. pyrefly-check exposes 2 inputs in total.

example

Run pyrefly-check

pyrefly-check · command
python3 /app/run.py --source ./source ./output

guidance

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

source: Folder of Python source (.py/.pyi); maximum 50 MiB and 5000 entries. Only the standard library and Pyrefly's bundled stubs resolve. preset: basic, legacy, default (default), strict or all.

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.

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.

The public image repository gives immutable image and ORAS download commands, the expected source/notices bundle checksum and pinned upstream source directions. The accompanying OCI bundle retains the original build recipe, runtime sources and full installed notices. The Git recipe keeps primary notices and an exact layer/hash index; it does not duplicate the full installed notice tree or mirror every upstream source archive. Image, source and license notice downloads.

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.