Skip to main content

Crate fxrank_lang_python

Crate fxrank_lang_python 

Source
Expand description

Python (libcst-based) frontend for FxRank’s effect-cost profiler.

Modules§

coverage
Signature annotation-slot coverage + Any/decorator analysis — the Python analog of fxrank-lang-ts’s coverage.rs. The project thesis (“types lower the score”) made operational for gradual-typed Python: we measure how much of a function’s signature is explicitly annotated (its boundary), so the boundary-containment discount in analyze_unit can shift contained effects down when the boundary is honest, and void the discount when Any poisons it.
detect
Per-function effect/risk detection and Hotspot assembly.
functions
Collect every function-unit (def/async def, method, nested def, lambda) from a parsed Python Module.
imports
Import-resolution table: import, from … import, and … as … forms.
source

Structs§

PythonFrontend
The Python language frontend.

Functions§

is_test_file
Return true if path identifies a test file by Python convention: