NavigaraNavigara
OrganizationsDistributionCompareResearch
NavigaraNavigara
OrganizationsDistributionCompareResearch
All developers

Maxime Arthaud

Developer

Maxime Arthaud

arthaud@meta.com

153 commits~3 files/commit

Performance

2026Previous year

Insights

Key patterns and highlights from this developer's activity.

Peak MonthOct'25522 performance
Growth Trend↓44%vs prior period
Avg Files/Commit3files per commit
Active Days91of 455 days
Top Repopyrefly153 commits

Effort Over Time

Breakdown of growth, maintenance, and fixes effort over time.

Bug Behavior

Beta

Bugs introduced vs. fixed over time.

Investment Quality

Beta

Reclassifies engineering effort based on bug attribution. Commits that introduced bugs are retrospectively counted as poor investments.

34%Productive TimeGrowth 75% + Fixes 25%
35%Maintenance Time
31%Wasted Time
How it works

Methodology

Investment Quality reclassifies engineering effort based on bug attribution data. Commits identified as buggy origins (those that introduced bugs later fixed by someone) have their grow and maintenance time moved into the Wasted Time category. Their waste (fix commits) remains counted as productive. All other commits retain their standard classification: grow is productive, maintenance is maintenance, and waste (fixes) is productive.

Relationship to Growth / Maintenance / Fixes

The standard model classifies commits as Growth, Maintenance, or Fixes. Investment Quality adds a quality lens: a commit that introduced a bug is retrospectively counted as a poor investment — the engineering time spent on it was wasted because it ultimately required additional fix work. Fix commits (Fixes in the standard model) are reframed as productive, because fixing bugs is valuable work.

Proposed API Endpoint

Currently computed client-side from commit and bug attribution data. Ideal server-side endpoint:

POST /v1/organizations/{orgId}/investment-quality
Content-Type: application/json

Request:
{
  "startTime": "2025-01-01T00:00:00Z",
  "endTime": "2025-12-31T23:59:59Z",
  "bucketSize": "BUCKET_SIZE_MONTH",
  "groupBy": ["repository_id" | "deliverer_email"]
}

Response:
{
  "productivePct": 74,
  "maintenancePct": 18,
  "wastedPct": 8,
  "buckets": [
    {
      "bucketStart": "2025-01-01T00:00:00Z",
      "productive": 4.2,
      "maintenance": 1.8,
      "wasted": 0.6
    }
  ]
}

Recent Activity

Latest analyzed commits from this developer.

HashMessageDateFilesEffort
3cfaa67This commit **fixes a regression** in the **`pyrefly` binding layer** by addressing missing arguments in calls to `synthesize_collections_named_tuple_def` and `synthesize_typing_named_tuple_def`. Specifically, it updates the two call sites within **`expr.rs`** that handle **functional-form `namedtuple` definitions**. The `adjacent_defaults` parameter, which was previously omitted, is now correctly passed as `None` since these functional calls do not have adjacent class-body defaults. This **bug fix** ensures the proper synthesis of `namedtuple` types, resolving an oversight from a prior change that introduced the parameter.Mar 261waste
5b8f5d4This commit introduces **support for Python properties defined via direct assignment** (e.g., `foo = property(get_foo)`) within the **Pysa call graph generation**. Previously, the call graph only recognized properties defined using the `@property` decorator, leading to incomplete analysis. The **call graph visitor** in `pyrefly/lib/report/pysa/call_graph.rs` is now enhanced to **resolve the underlying getter function** for these assigned properties. This is achieved by updating the **module index** (`pyrefly/lib/report/pysa/module_index.rs`) to store getter references and modifying `ClassField` to identify properties, thereby improving the accuracy of **Pysa's data flow analysis** for a broader range of Python code patterns. This **feature enhancement** ensures more comprehensive security and correctness checks by correctly modeling these property accesses.Mar 255grow
8bd60a2This commit introduces a **new capability** to the **`ModuleIds` system** within `pyrefly/lib/report/pysa/module.rs` by **pre-assigning deterministic module IDs** for all bundled **typeshed modules**. It ensures these modules are sorted and assigned IDs starting from 1 *before* project handles are processed, which then continue the ID counter from a rounded boundary. This **feature enhancement** guarantees **stable and predictable identification** for typeshed modules, improving the consistency of static analysis results within tools like Pysa. Dependency modules discovered later will still receive lazy IDs, maintaining flexibility for dynamic dependencies.Mar 231grow
bd90914This commit **enhances Pysa's static analysis capabilities** by introducing **support for projects with multiple Python versions and/or platforms**. It achieves this by replacing `ModuleKey` with `Handle` in Pysa's module ID assignment, ensuring that modules with different `SysInfo` (Python version or platform) receive distinct `ModuleId`s. This **feature enhancement** involves **refactoring** the **Pysa module identification system** to attach `SysInfo` to each module and updating the `pyrefly.pysa.json` project file structure to support multiple builtin and typing variants. The change allows Pysa to accurately analyze complex codebases that mix environments, significantly improving its applicability.Mar 2310grow
ad93ac1This commit performs **refactoring** within the **`pyrefly` library** to address lint warnings. It adjusts the visibility of internal components, making the `with_solver` function in `pysa`'s context module crate-private while exposing the `GraphQLDecoratorRef` struct and its fields in `pysa`'s module index as public. Additionally, the argument passing style for the `get_module` function call in the state management module is modified. These changes improve internal code consistency and encapsulation within `pyrefly`'s **`pysa` reporting, module indexing, and state management subsystems**.Mar 223maint
1240667This commit **refactors the Pysa reporting mechanism** within `pyrefly` to significantly **reduce memory consumption** and prevent Out-Of-Memory errors during analysis. Instead of a separate post-processing step, Pysa reporting is now **inlined during type checking** for each module, allowing for early eviction of module-specific data from memory. This is achieved by introducing `PysaSolutions` to store per-module Pysa data and a `PysaReporter` that leverages a new `PysaResolver` for efficient cross-module lookups, thereby eliminating the need for large `WholeProgramXXX` data structures. The change primarily impacts the **`pyrefly` type checking pipeline** and **Pysa analysis subsystem**, leading to a more scalable and memory-efficient analysis process.Mar 2124maint
9b9ef01This commit introduces `ModuleAnswersContext` as a **refactoring** within the **`pyrefly` Pysa reporting subsystem** to separate module-specific data from cross-module dependencies. This change is a **preparatory step** for integrating Pysa reporting directly into the type-checking process, aiming to **reduce memory usage** by avoiding the preservation of full module states. By encapsulating data like AST, bindings, and answers in `ModuleAnswersContext`, it prevents accidental cross-module queries during Pysa information building, thereby avoiding resolution cycles. This architectural adjustment impacts numerous Pysa-related files, including `call_graph.rs` and `class.rs`, by narrowing their context dependencies and inlining `get_class_field_from_current_class_only` to use the new, more restricted context.Mar 2021maint
8e649ffThis commit **refactors** the **PySA extraction logic** by moving the `overridden_base_method` field from `FunctionBaseDefinition` to `FunctionDefinition` within the `pyrefly` module. This change shifts the override graph lookup from `export_all_functions` to `export_function_definitions`, which is a crucial prerequisite for **inlining PySA extraction** before eviction. As part of this **maintenance** and **code cleanup**, the unused `WholeProgramReversedOverrideGraph` struct and `build_reversed_override_graph` function are removed, simplifying the **override graph handling**. The **PySA analysis pipeline** benefits from a more streamlined architecture, with updated tests reflecting these changes.Mar 196maint
0fc206eThis commit **refactors** the **Pysa static analysis module** by making the `global_variables` and `captured_variables` fields of the `CallGraphVisitor` struct **optional**. This change allows for more flexible instantiation of the visitor, particularly in contexts like `resolve_decorator_callees` or during future inline Pysa extraction where these variables might not yet be available. Additionally, the `export_call_graphs` function was updated to accept module-specific captured variables (`&ModuleCapturedVariables<FunctionRef>`) instead of whole-program variables, pushing the per-module extraction logic to its callers. This **refactoring** enhances the modularity and adaptability of the **call graph generation** process within Pysa.Mar 193maint
537a1b8This commit **refactors** the **`pyrefly/lib/report/pysa`** module by modifying the `ModuleContext::create()` function. Instead of returning an `Option<ModuleContext>`, the function now directly returns a `ModuleContext`, incorporating `.expect()` calls internally to provide more descriptive panic messages if essential components are missing during creation. This change **improves error diagnostics** for the `ModuleContext` creation process and simplifies caller code by eliminating redundant `.unwrap()` calls. The update affects all internal callers of `ModuleContext::create()` within the Pysa reporting subsystem and its associated test suite, ensuring consistent and clearer failure modes.Mar 1815maint
753c5a3This commit introduces the **`PysaModuleIndex`** and **`WholeProgramPysaModuleIndex`** to fundamentally **refactor** how cross-module data is accessed within the **`pyrefly` Pysa reporting subsystem**. This **new capability** provides a compact, persistent index for Pysa-relevant data like function references and class fields, built during type checking to replace memory-intensive direct `ModuleContext::create` calls. The change significantly impacts **call graph resolution**, **class and function definition handling**, and **override graph construction**, enabling more efficient lookups. This **performance optimization** is a foundational step towards integrating Pysa reporting directly into the type-checking process, aiming for **reduced memory usage** by persisting Pysa-relevant data after module eviction.Mar 1714maint
2ef9d84This commit **refactors** the **call graph building logic** within **`pyrefly`'s Pysa reporting** to eliminate its direct dependency on the override graph. Previously, call graph generation required a global override graph, which is incompatible with the planned integration of Pysa reporting into the type-checking phase. Now, virtual method calls directly emit a `Target::Override` with a `receiver_class`, deferring the expansion and filtering of overrides to the Pysa analysis itself, where the override graph is available. This **preparatory change** enables a future re-design aimed at **reducing memory usage** during Pysa reporting by avoiding the preservation of internal states across all modules. The changes are primarily in `pyrefly/lib/report/pysa/call_graph.rs`, with corresponding test updates.Mar 144maint
45f447eThis commit **fixes a crash** in the **`answers_solver`** within `pyrefly/lib/alt/answers_solver.rs` that occurred during cross-module SCC cold iteration. The issue stemmed from solver-local `Vars` incorrectly leaking into an outer module's trace sink when `record_type_trace` was called, leading to a panic upon trace finalization. The **bug fix** ensures a dedicated trace sink is always installed when tracing is enabled, regardless of cold iteration status, preventing foreign `Vars` from contaminating outer contexts. Traces collected during cold iteration are now properly discarded, enhancing the **stability** and **correctness** of the solver's tracing mechanism.Mar 141waste
9334874This commit **adds a new test case** to `pyrefly/lib/test/pysa/call_graph.rs` to document a **bug** in **Pyrefly's call graph generation** logic. It specifically highlights an issue where calling a class method on a **union type within `Type`** (e.g., `Type[A | B]`) causes Pyrefly to incorrectly lose the `receiver_class`, resulting in a `Function` dispatch instead of the expected `AllOverrides`. This incorrect dispatch prevents **Pysa** from considering subclass overrides, leading to potential **false negatives** in its analysis. The test serves as a **maintenance** item, capturing the current buggy behavior and indicating the need for a future **bug fix** to ensure accurate dispatch and improve Pysa's security analysis.Mar 121maint
49bf51bThis commit **adds new call graph tests** within `pyrefly/lib/test/pysa/call_graph.rs` to document the current behavior of constructor call graphs for **dataclass and NamedTuple types**. The tests illustrate that `dataclass` `__init__` resolves to the class and `__new__` to `builtins.object.__new__`, while `NamedTuple` `__new__` resolves to the user's class with `implicit_receiver: TrueWithObjectReceiver`. Furthermore, it demonstrates that `__init__` and `__new__` are attributed to `NamedTuple` subclasses even without explicit definitions. This **maintenance** work improves the accuracy and validation of **Pysa's call graph analysis** for these common Python constructs.Mar 101maint
752a3c4This commit **fixes a bug** in **Pysa's call graph analysis** within `pyrefly` that previously led to **false negatives**. Specifically, the system failed to consider all potential overrides when analyzing calls to expressions inferred as a type variable with a bound. The `receiver_class_from_type` function in `pyrefly/lib/report/pysa/call_graph.rs` is updated to correctly use the bound of a quantified type variable for receiver resolution. This ensures more accurate call graph generation, improving the reliability of `pysa-pyrefly`'s analysis, especially for generic classes and method overrides, and is validated by a new test case.Mar 72waste
c52125eThis commit **adds new tests** to `pyrefly/lib/test/pysa/call_graph.rs` to verify the **call graph resolution** for properties and classproperties that return a `Type[X]`. Specifically, it checks if calling the result correctly resolves to the constructor (`__init__`) in the **Pysa call graph**. The tests confirm that `property` works as expected, but reveal a **bug** where `classproperty` fails to resolve the call to the constructor, treating it as a regular function call instead. This **test addition** helps identify a discrepancy in how **Pysa's call graph analysis** handles these specific scenarios, highlighting an area for improvement in the static analysis.Mar 61maint
c7eec05This commit introduces a **performance optimization** within the **Pysa type export mechanism** by **refactoring** the `pyrefly/lib/report/pysa/type_of_expression.rs` module. Specifically, the `maybe_export_type` and `visit_expression` functions are updated to **selectively export expression types**. Instead of exporting all types, the system now only includes types for Name nodes, Attribute access bases, and Call arguments, which are the only categories required by **Pysa** for features like type breadcrumbs, call graph construction, and method checks. This targeted approach significantly **reduces the volume of data written to JSON and parsed by the OCaml consumer**, thereby improving the overall efficiency of the **Pysa static analysis tool**.Mar 41maint
99255c9This commit introduces a **new capability** by implementing a `FuncDefIndex` to uniquely identify function definitions within the **PyreFly** system, particularly for **Pysa's taint analysis**. This index is assigned during the binding phase and stored in `UndecoratedFunction` metadata, addressing a critical limitation where functions could not be uniquely identified by name and module alone, leading to unresolved calls. The primary impact is on **Pysa's call graph generation**, enabling more accurate resolution of function calls and significantly improving the precision of taint analysis by reducing false positives and negatives. This change involves **refactoring** across `pyrefly_types`, `pyrefly/lib/binding`, and `pyrefly/lib/alt` to integrate the new indexing mechanism and update existing function metadata structures.Feb 2620grow
551b2efThis commit **improves the inference of `is_attribute=True`** within the **Pysa call graph generation** in `pyrefly`. It **refactors** the attribute resolution logic in `pyrefly/lib/report/pysa/call_graph.rs` by removing the dedicated `resolve_magic_dunder_attr` function and integrating its functionality into `resolve_attribute_access`. This **enhancement** ensures that `is_attribute` is correctly inferred when "go to definition" returns the location of an attribute. The change leads to more accurate **Pysa analysis results** and a better understanding of code structure by precisely identifying attributes.Feb 252waste
3cfaa67Mar 26

This commit **fixes a regression** in the **`pyrefly` binding layer** by addressing missing arguments in calls to `synthesize_collections_named_tuple_def` and `synthesize_typing_named_tuple_def`. Specifically, it updates the two call sites within **`expr.rs`** that handle **functional-form `namedtuple` definitions**. The `adjacent_defaults` parameter, which was previously omitted, is now correctly passed as `None` since these functional calls do not have adjacent class-body defaults. This **bug fix** ensures the proper synthesis of `namedtuple` types, resolving an oversight from a prior change that introduced the parameter.

1 fileswaste
5b8f5d4Mar 25

This commit introduces **support for Python properties defined via direct assignment** (e.g., `foo = property(get_foo)`) within the **Pysa call graph generation**. Previously, the call graph only recognized properties defined using the `@property` decorator, leading to incomplete analysis. The **call graph visitor** in `pyrefly/lib/report/pysa/call_graph.rs` is now enhanced to **resolve the underlying getter function** for these assigned properties. This is achieved by updating the **module index** (`pyrefly/lib/report/pysa/module_index.rs`) to store getter references and modifying `ClassField` to identify properties, thereby improving the accuracy of **Pysa's data flow analysis** for a broader range of Python code patterns. This **feature enhancement** ensures more comprehensive security and correctness checks by correctly modeling these property accesses.

5 filesgrow
8bd60a2Mar 23

This commit introduces a **new capability** to the **`ModuleIds` system** within `pyrefly/lib/report/pysa/module.rs` by **pre-assigning deterministic module IDs** for all bundled **typeshed modules**. It ensures these modules are sorted and assigned IDs starting from 1 *before* project handles are processed, which then continue the ID counter from a rounded boundary. This **feature enhancement** guarantees **stable and predictable identification** for typeshed modules, improving the consistency of static analysis results within tools like Pysa. Dependency modules discovered later will still receive lazy IDs, maintaining flexibility for dynamic dependencies.

1 filesgrow
bd90914Mar 23

This commit **enhances Pysa's static analysis capabilities** by introducing **support for projects with multiple Python versions and/or platforms**. It achieves this by replacing `ModuleKey` with `Handle` in Pysa's module ID assignment, ensuring that modules with different `SysInfo` (Python version or platform) receive distinct `ModuleId`s. This **feature enhancement** involves **refactoring** the **Pysa module identification system** to attach `SysInfo` to each module and updating the `pyrefly.pysa.json` project file structure to support multiple builtin and typing variants. The change allows Pysa to accurately analyze complex codebases that mix environments, significantly improving its applicability.

10 filesgrow
ad93ac1Mar 22

This commit performs **refactoring** within the **`pyrefly` library** to address lint warnings. It adjusts the visibility of internal components, making the `with_solver` function in `pysa`'s context module crate-private while exposing the `GraphQLDecoratorRef` struct and its fields in `pysa`'s module index as public. Additionally, the argument passing style for the `get_module` function call in the state management module is modified. These changes improve internal code consistency and encapsulation within `pyrefly`'s **`pysa` reporting, module indexing, and state management subsystems**.

3 filesmaint
1240667Mar 21

This commit **refactors the Pysa reporting mechanism** within `pyrefly` to significantly **reduce memory consumption** and prevent Out-Of-Memory errors during analysis. Instead of a separate post-processing step, Pysa reporting is now **inlined during type checking** for each module, allowing for early eviction of module-specific data from memory. This is achieved by introducing `PysaSolutions` to store per-module Pysa data and a `PysaReporter` that leverages a new `PysaResolver` for efficient cross-module lookups, thereby eliminating the need for large `WholeProgramXXX` data structures. The change primarily impacts the **`pyrefly` type checking pipeline** and **Pysa analysis subsystem**, leading to a more scalable and memory-efficient analysis process.

24 filesmaint
9b9ef01Mar 20

This commit introduces `ModuleAnswersContext` as a **refactoring** within the **`pyrefly` Pysa reporting subsystem** to separate module-specific data from cross-module dependencies. This change is a **preparatory step** for integrating Pysa reporting directly into the type-checking process, aiming to **reduce memory usage** by avoiding the preservation of full module states. By encapsulating data like AST, bindings, and answers in `ModuleAnswersContext`, it prevents accidental cross-module queries during Pysa information building, thereby avoiding resolution cycles. This architectural adjustment impacts numerous Pysa-related files, including `call_graph.rs` and `class.rs`, by narrowing their context dependencies and inlining `get_class_field_from_current_class_only` to use the new, more restricted context.

21 filesmaint
8e649ffMar 19

This commit **refactors** the **PySA extraction logic** by moving the `overridden_base_method` field from `FunctionBaseDefinition` to `FunctionDefinition` within the `pyrefly` module. This change shifts the override graph lookup from `export_all_functions` to `export_function_definitions`, which is a crucial prerequisite for **inlining PySA extraction** before eviction. As part of this **maintenance** and **code cleanup**, the unused `WholeProgramReversedOverrideGraph` struct and `build_reversed_override_graph` function are removed, simplifying the **override graph handling**. The **PySA analysis pipeline** benefits from a more streamlined architecture, with updated tests reflecting these changes.

6 filesmaint
0fc206eMar 19

This commit **refactors** the **Pysa static analysis module** by making the `global_variables` and `captured_variables` fields of the `CallGraphVisitor` struct **optional**. This change allows for more flexible instantiation of the visitor, particularly in contexts like `resolve_decorator_callees` or during future inline Pysa extraction where these variables might not yet be available. Additionally, the `export_call_graphs` function was updated to accept module-specific captured variables (`&ModuleCapturedVariables<FunctionRef>`) instead of whole-program variables, pushing the per-module extraction logic to its callers. This **refactoring** enhances the modularity and adaptability of the **call graph generation** process within Pysa.

3 filesmaint
537a1b8Mar 18

This commit **refactors** the **`pyrefly/lib/report/pysa`** module by modifying the `ModuleContext::create()` function. Instead of returning an `Option<ModuleContext>`, the function now directly returns a `ModuleContext`, incorporating `.expect()` calls internally to provide more descriptive panic messages if essential components are missing during creation. This change **improves error diagnostics** for the `ModuleContext` creation process and simplifies caller code by eliminating redundant `.unwrap()` calls. The update affects all internal callers of `ModuleContext::create()` within the Pysa reporting subsystem and its associated test suite, ensuring consistent and clearer failure modes.

15 filesmaint
753c5a3Mar 17

This commit introduces the **`PysaModuleIndex`** and **`WholeProgramPysaModuleIndex`** to fundamentally **refactor** how cross-module data is accessed within the **`pyrefly` Pysa reporting subsystem**. This **new capability** provides a compact, persistent index for Pysa-relevant data like function references and class fields, built during type checking to replace memory-intensive direct `ModuleContext::create` calls. The change significantly impacts **call graph resolution**, **class and function definition handling**, and **override graph construction**, enabling more efficient lookups. This **performance optimization** is a foundational step towards integrating Pysa reporting directly into the type-checking process, aiming for **reduced memory usage** by persisting Pysa-relevant data after module eviction.

14 filesmaint
2ef9d84Mar 14

This commit **refactors** the **call graph building logic** within **`pyrefly`'s Pysa reporting** to eliminate its direct dependency on the override graph. Previously, call graph generation required a global override graph, which is incompatible with the planned integration of Pysa reporting into the type-checking phase. Now, virtual method calls directly emit a `Target::Override` with a `receiver_class`, deferring the expansion and filtering of overrides to the Pysa analysis itself, where the override graph is available. This **preparatory change** enables a future re-design aimed at **reducing memory usage** during Pysa reporting by avoiding the preservation of internal states across all modules. The changes are primarily in `pyrefly/lib/report/pysa/call_graph.rs`, with corresponding test updates.

4 filesmaint
45f447eMar 14

This commit **fixes a crash** in the **`answers_solver`** within `pyrefly/lib/alt/answers_solver.rs` that occurred during cross-module SCC cold iteration. The issue stemmed from solver-local `Vars` incorrectly leaking into an outer module's trace sink when `record_type_trace` was called, leading to a panic upon trace finalization. The **bug fix** ensures a dedicated trace sink is always installed when tracing is enabled, regardless of cold iteration status, preventing foreign `Vars` from contaminating outer contexts. Traces collected during cold iteration are now properly discarded, enhancing the **stability** and **correctness** of the solver's tracing mechanism.

1 fileswaste
9334874Mar 12

This commit **adds a new test case** to `pyrefly/lib/test/pysa/call_graph.rs` to document a **bug** in **Pyrefly's call graph generation** logic. It specifically highlights an issue where calling a class method on a **union type within `Type`** (e.g., `Type[A | B]`) causes Pyrefly to incorrectly lose the `receiver_class`, resulting in a `Function` dispatch instead of the expected `AllOverrides`. This incorrect dispatch prevents **Pysa** from considering subclass overrides, leading to potential **false negatives** in its analysis. The test serves as a **maintenance** item, capturing the current buggy behavior and indicating the need for a future **bug fix** to ensure accurate dispatch and improve Pysa's security analysis.

1 filesmaint
49bf51bMar 10

This commit **adds new call graph tests** within `pyrefly/lib/test/pysa/call_graph.rs` to document the current behavior of constructor call graphs for **dataclass and NamedTuple types**. The tests illustrate that `dataclass` `__init__` resolves to the class and `__new__` to `builtins.object.__new__`, while `NamedTuple` `__new__` resolves to the user's class with `implicit_receiver: TrueWithObjectReceiver`. Furthermore, it demonstrates that `__init__` and `__new__` are attributed to `NamedTuple` subclasses even without explicit definitions. This **maintenance** work improves the accuracy and validation of **Pysa's call graph analysis** for these common Python constructs.

1 filesmaint
752a3c4Mar 7

This commit **fixes a bug** in **Pysa's call graph analysis** within `pyrefly` that previously led to **false negatives**. Specifically, the system failed to consider all potential overrides when analyzing calls to expressions inferred as a type variable with a bound. The `receiver_class_from_type` function in `pyrefly/lib/report/pysa/call_graph.rs` is updated to correctly use the bound of a quantified type variable for receiver resolution. This ensures more accurate call graph generation, improving the reliability of `pysa-pyrefly`'s analysis, especially for generic classes and method overrides, and is validated by a new test case.

2 fileswaste
c52125eMar 6

This commit **adds new tests** to `pyrefly/lib/test/pysa/call_graph.rs` to verify the **call graph resolution** for properties and classproperties that return a `Type[X]`. Specifically, it checks if calling the result correctly resolves to the constructor (`__init__`) in the **Pysa call graph**. The tests confirm that `property` works as expected, but reveal a **bug** where `classproperty` fails to resolve the call to the constructor, treating it as a regular function call instead. This **test addition** helps identify a discrepancy in how **Pysa's call graph analysis** handles these specific scenarios, highlighting an area for improvement in the static analysis.

1 filesmaint
c7eec05Mar 4

This commit introduces a **performance optimization** within the **Pysa type export mechanism** by **refactoring** the `pyrefly/lib/report/pysa/type_of_expression.rs` module. Specifically, the `maybe_export_type` and `visit_expression` functions are updated to **selectively export expression types**. Instead of exporting all types, the system now only includes types for Name nodes, Attribute access bases, and Call arguments, which are the only categories required by **Pysa** for features like type breadcrumbs, call graph construction, and method checks. This targeted approach significantly **reduces the volume of data written to JSON and parsed by the OCaml consumer**, thereby improving the overall efficiency of the **Pysa static analysis tool**.

1 filesmaint
99255c9Feb 26

This commit introduces a **new capability** by implementing a `FuncDefIndex` to uniquely identify function definitions within the **PyreFly** system, particularly for **Pysa's taint analysis**. This index is assigned during the binding phase and stored in `UndecoratedFunction` metadata, addressing a critical limitation where functions could not be uniquely identified by name and module alone, leading to unresolved calls. The primary impact is on **Pysa's call graph generation**, enabling more accurate resolution of function calls and significantly improving the precision of taint analysis by reducing false positives and negatives. This change involves **refactoring** across `pyrefly_types`, `pyrefly/lib/binding`, and `pyrefly/lib/alt` to integrate the new indexing mechanism and update existing function metadata structures.

20 filesgrow
551b2efFeb 25

This commit **improves the inference of `is_attribute=True`** within the **Pysa call graph generation** in `pyrefly`. It **refactors** the attribute resolution logic in `pyrefly/lib/report/pysa/call_graph.rs` by removing the dedicated `resolve_magic_dunder_attr` function and integrating its functionality into `resolve_attribute_access`. This **enhancement** ensures that `is_attribute` is correctly inferred when "go to definition" returns the location of an attribute. The change leads to more accurate **Pysa analysis results** and a better understanding of code structure by precisely identifying attributes.

2 fileswaste

Work Patterns

Beta

Commit activity distribution by hour and day of week. Shows when this developer is most active.

Collaboration

Beta

Developers who frequently work on the same files and symbols. Higher score means stronger code collaboration.

NavigaraNavigara
OrganizationsDistributionCompareResearch