NavigaraNavigara
OrganizationsDistributionCompareResearch
NavigaraNavigara
OrganizationsDistributionCompareResearch
All developers

Adist319

Developer

Adist319

ongadrian30@gmail.com

21 commits~5 files/commit

Performance

2026Previous year

Insights

Key patterns and highlights from this developer's activity.

Peak MonthOct'2566 performance
Growth Trend↑156%vs prior period
Avg Files/Commit5files per commit
Active Days21of 455 days
Top Repopyrefly21 commits

Effort Over Time

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

Bug Behavior

Beta

Bugs introduced vs. fixed over time.

No bugs introduced or fixed in this period.

Investment Quality

Beta

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

84%Productive TimeGrowth 71% + Fixes 29%
16%Maintenance Time
0%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
27106c2This commit introduces **support for `__new__.__defaults__` assignments** immediately following functional `namedtuple` definitions, enabling optional trailing fields in their constructors. It enhances the **type checker's binding logic** for both `collections.namedtuple` and `typing.NamedTuple` forms, ensuring this common Python idiom is correctly understood. This **new capability** improves **type checking accuracy** by aligning the type checker's behavior with Python's runtime semantics, effectively **fixing issue #2611**. The implementation involves detecting adjacent assignments and applying right-aligned defaults during namedtuple synthesis. This ensures that `namedtuple`s defined with this pattern are correctly analyzed, allowing for more flexible constructor calls.Mar 255grow
8d5fe4cThis commit provides a **bug fix** for the **static analysis engine** to correctly handle variables defined using the **walrus operator (`:=`)** within `if` statement conditions. Previously, the analyzer would incorrectly report `unbound-name` errors for such variables after the `if` block, as they were not properly registered in the base flow. The fix modifies the **binding and statement processing logic** in `pyrefly/lib/binding/stmt.rs` to evaluate the `if` test expression before branching, ensuring walrus-defined names are visible post-statement. This improves the accuracy of **type checking and code analysis**, preventing false positives for valid Python constructs and enhancing the reliability of the **diagnostic system**.Mar 123maint
70cb58dThis commit introduces **type checking enforcement** for Python's `__slots__` mechanism, resolving a semantic gap where undeclared attribute writes were not flagged. It now correctly emits a **`missing-attribute` error** when attempting to write to an attribute not specified in a class's `__slots__`, covering various declaration forms including `dataclass(slots=True)`. This **new capability** is implemented across **`pyrefly/lib/alt/attr.rs`** for external attribute writes and **`pyrefly/lib/alt/class/class_field.rs`** for instance attribute creation. Careful suppression logic is included for scenarios like custom `__setattr__` or unslotted ancestors, ensuring accurate **Python semantics**. This significantly improves the type safety and adherence to Python's `__slots__` behavior within the analyzer.Mar 119grow
6951b91This commit introduces a **WYSIWYG enhancement** to the **display of generic type arguments**, specifically for types utilizing default type parameters as defined by PEP 696. It **modifies the type rendering logic** within the `pyrefly_types` crate to omit trailing type arguments that match their default values, making displayed types more concise and "as written." A new `TArgs::display_count()` method was added to determine the effective number of arguments to show, impacting `fmt_targs` and other type output mechanisms. This **readability improvement** ensures that users see simplified representations like `Generator[str]` instead of `Generator[str, None, None]`, enhancing the clarity of type information throughout the system.Mar 210grow
f3fffb3This commit **fixes a false positive `unbound-name` diagnostic** within the **flow analysis** system. Previously, `pyrefly` would incorrectly report a variable as uninitialized when it was assigned in a `try` block and a `NoReturn` function was called in the corresponding `except` block, particularly when this structure was nested inside an `if` statement. The **bug fix** modifies the `FlowStyle::merged()` function to correctly combine `MaybeInitialized` states and preserve termination keys, ensuring that `NoReturn` paths are properly recognized as always exiting. This **improves the accuracy of type checking** by preventing erroneous `unbound-name` errors in these specific control flow scenarios.Feb 242waste
6c5415fThis commit **fixes a bug** in `pyrefly`'s **type inference engine** where functions returning `TypeIs[T]` or `TypeGuard[T]` were incorrectly inferred to return their specific `TypeIs` or `TypeGuard` type instead of `bool`. The **type inference logic** within `expr_call_infer` in `pyrefly/lib/alt/call.rs` is updated to correctly convert these special types to `bool` when determining the return type of a call. This ensures that the **type checker** accurately processes the return values of such functions, improving the reliability of **type analysis** and **narrowing logic** for user code. New **test cases** were added to validate this correction.Jan 233maint
a557539This commit introduces a **new capability** to display **type variable bounds, constraints, and default values** within `forall` types, significantly improving the precision of **type introspection and diagnostics**. It enhances the **`pyrefly_types` crate**'s formatting logic, specifically in `crates/pyrefly_types/src/types.rs`, ensuring that `reveal_type` now provides a complete and unambiguous representation of generic function signatures. This **fixes a long-standing issue** where critical type variable restrictions were previously omitted, leading to clearer understanding for users. The change impacts how generic types are presented in diagnostic output, making it easier to differentiate functions with similar but distinct type variable definitions.Jan 226maint
d24d086This commit **fixes and enhances type narrowing for sequence patterns** within `match/case` statements, addressing issues where union types were not correctly filtered and captured variables were improperly typed. It introduces the `Sequence` type to the standard library and implements `IsSequence`/`IsNotSequence` operations to ensure the **type checker** accurately narrows types and correctly infers `list[T]` for star-captured variables like `*values`. This **bug fix and feature enhancement** significantly improves the **precision of type inference** for pattern matching, while also adhering to PEP 634 by explicitly excluding `str`, `bytes`, and `bytearray` from sequence pattern matching.Jan 146grow
6bef521This commit delivers a **bug fix** for the **PyRefly type solver** to ensure correct `TypeVar` resolution order within **union type aliases**. Previously, `TypeVar`s were collected and ordered incorrectly due to alphabetical sorting of union members, leading to misassigned type parameters during **type inference** for constructs like `Result[T, TE]`. The core change in `pyrefly/lib/alt/solve.rs` modifies the `tvars_to_tparams_for_type_alias` function to store and sort `TypeVar`s by their source location, preserving the user's intended order. This rectifies a critical issue in **type checking** for complex type aliases, preventing subtle but significant type mismatches. New test cases in `pyrefly/lib/test/type_alias.rs` validate the corrected behavior across various scenarios.Jan 102waste
e7fc1fdThis commit **fixes an incorrect "unreachable" warning** in the **`pyrefly` static analyzer** related to **`for-else` statements**. Previously, the `else` clause was erroneously flagged as unreachable when the loop's iterable might be empty, even if the loop body itself always terminated. The **bug fix** corrects the control flow analysis logic within `pyrefly/lib/binding/scope.rs` to accurately determine branch reachability for these constructs. This change prevents false positive warnings, improving the analyzer's precision and developer experience. New test cases in `pyrefly/lib/test/flow_looping.rs` validate the correct reachability analysis for various `for-else` scenarios.Jan 82waste
d8dc4ceThis commit **introduces a new metadata file**, `stubs_metadata.json`, within the `crates/pyrefly_bundled/third_party/` directory. This file serves as a central repository for documenting crucial source information about non-Typeshed stub packages bundled in the project. It includes details such as source repository URLs, PyPI links, license, author information, and bundling dates for these external stubs. This **new capability** significantly improves the project's ability to track and manage its **third-party stub dependencies**, enhancing transparency and maintainability for the `pyrefly_bundled` module.Jan 71grow
e4bf8eeThis commit introduces a **feature enhancement** to **Pyrefly's type checker**, specifically improving **overload resolution error messages**. The `pyrefly/lib/alt/overload.rs` module is updated to display the actual argument types provided in a function call when no matching overload is found. This **resolves a usability issue** by providing clearer diagnostics, allowing users to immediately understand why an overload call failed without further investigation. Conformance tests in `conformance/third_party/conformance.exp` and new unit tests in `pyrefly/lib/test/overload.rs` validate this improved error reporting.Oct 234grow
3e8787bThis commit introduces a **new feature** to the **Language Server Protocol (LSP) hover functionality** within `pyrefly`, allowing users to inspect suppressed errors. Specifically, hovering over `# pyrefly: ignore` or `# type: ignore` comments will now display the diagnostics that are being ignored. This enhancement improves developer feedback by making hidden issues more discoverable, leveraging new utility functions in `crates/pyrefly_python/src/ignore.rs` for comment parsing and suppression retrieval. The change directly addresses user experience by providing immediate context for ignored code, making `pyrefly` more transparent and user-friendly.Oct 203grow
2f35751This commit introduces **support for `LiteralString`** within the type checker's handling of `format()`, `join()`, and `replace()` methods. It **enhances the type inference system** by modifying attribute lookup in `pyrefly/lib/alt/attr.rs` to bind these methods to `Type::LiteralString` and utilize overload selection. A new `LiteralString` variant is added to `InstanceKind` in `pyrefly/lib/alt/class/class_field.rs` to correctly represent and manage attributes for these instances. This **new capability** ensures more accurate type checking and completion for string operations involving `LiteralString` types, aligning the type checker with the Python typing specification.Oct 63grow
a24d67bThis commit introduces a **new capability** to `pyrefly` by preventing the direct instantiation of **abstract classes**, aligning its behavior with Python's Abstract Base Classes (ABCs). It enhances the **runtime correctness** of the `pyrefly` interpreter by implementing checks within the `call_function` logic in `pyrefly/lib/alt/call.rs`. To support this, **class metadata** (`pyrefly/lib/alt/class/class_metadata.rs`) now stores information about abstract classes and their members, and `ClassField` (`pyrefly/lib/alt/class/class_field.rs`) tracks abstractness. This ensures that attempts to instantiate an abstract class will now correctly raise a `Bad Instantation Error`, providing clear feedback about the unfulfilled abstract members. New **conformance tests** have been added to validate this behavior.Oct 411grow
b1b3ff0This commit introduces a **new capability** to the **Pyrefly sandbox**, enabling users to select a specific Python version (3.8-3.12) for code execution and type checking. It adds a **Python version selector dropdown** to the `Sandbox` UI, integrates this selection through the `pyrefly_wasm` layer, and updates the underlying `Playground` Rust logic to initialize with the chosen version. This enhancement allows users to easily observe how type checking behavior differs across various Python environments directly within the sandbox.Aug 86grow
75fa044This commit **fixes** a compliance issue in the **Pyrefly type checker** by enforcing that only the `total` keyword is valid when defining a `TypedDict`, aligning with PEP 589. Previously, invalid keywords were silently ignored, but now the system will raise a new `BadTypedDict` error. This **enhancement** to the **error reporting system** involves modifying the `infer_class_def` function in `pyrefly/lib/alt/class/class_metadata.rs` to validate `TypedDict` arguments. New **conformance tests** and **documentation** for the `bad-typed-dict` error are also included. This change improves the accuracy and user feedback of the **type checker** by providing explicit errors for non-compliant `TypedDict` definitions.Jun 207waste
f32c44eThis commit provides a **bug fix** and **refactoring** for **dataclass handling** within the `pyrefly` project, specifically addressing issue #409. It **corrects the behavior of `InitVar` fields**, ensuring they are no longer erroneously treated as instance attributes, which aligns with Python's `dataclasses` module specification. The change introduces `is_init_var` methods in `ClassField` and `Annotation` and updates various methods in `pyrefly/lib/alt/class` to prevent access to `InitVar` fields as instance attributes. This impacts how dataclass members are resolved, synthesized, and iterated, preventing incorrect attribute access and improving the accuracy of type resolution for dataclasses.Jun 168waste
0e1e39cThis commit **refactors** the **file discovery logic** to move dotfile exclusion from the configurable `project_excludes` list to the core globbing mechanism. Specifically, the `pyrefly_util/src/globs.rs` module now includes a `should_include_file` function to inherently filter out dotfiles and non-Python files, which is then used by `resolve_path`. This change ensures that **dotfiles are always ignored** during file scanning, making the system more robust and preventing them from being processed even if `project_excludes` is overridden. The `default_project_excludes` in `pyrefly/lib/config/config.rs` is updated to reflect this core exclusion. This **maintenance** improvement enhances the reliability of file processing by embedding a fundamental Python import rule directly into the globbing utility.Jun 32maint
94a8c2dThis commit **fixes a bug** in the **dataclass type checking** logic within `pyrefly` where constructors incorrectly expected `InitVar[T]` arguments instead of the specified inner type `T`, violating PEP 557. The `ClassField::as_param()` method was updated to correctly detect `InitVar` types and extract their inner type for constructor parameter qualification. This **bug fix** resolves incorrect type errors for dataclasses utilizing `InitVar` fields, ensuring that `Data("value")` works correctly for `mode: InitVar[str]`. The change significantly improves the **type checker's accuracy** for Python dataclass definitions and is verified by new conformance tests.May 305waste
27106c2Mar 25

This commit introduces **support for `__new__.__defaults__` assignments** immediately following functional `namedtuple` definitions, enabling optional trailing fields in their constructors. It enhances the **type checker's binding logic** for both `collections.namedtuple` and `typing.NamedTuple` forms, ensuring this common Python idiom is correctly understood. This **new capability** improves **type checking accuracy** by aligning the type checker's behavior with Python's runtime semantics, effectively **fixing issue #2611**. The implementation involves detecting adjacent assignments and applying right-aligned defaults during namedtuple synthesis. This ensures that `namedtuple`s defined with this pattern are correctly analyzed, allowing for more flexible constructor calls.

5 filesgrow
8d5fe4cMar 12

This commit provides a **bug fix** for the **static analysis engine** to correctly handle variables defined using the **walrus operator (`:=`)** within `if` statement conditions. Previously, the analyzer would incorrectly report `unbound-name` errors for such variables after the `if` block, as they were not properly registered in the base flow. The fix modifies the **binding and statement processing logic** in `pyrefly/lib/binding/stmt.rs` to evaluate the `if` test expression before branching, ensuring walrus-defined names are visible post-statement. This improves the accuracy of **type checking and code analysis**, preventing false positives for valid Python constructs and enhancing the reliability of the **diagnostic system**.

3 filesmaint
70cb58dMar 11

This commit introduces **type checking enforcement** for Python's `__slots__` mechanism, resolving a semantic gap where undeclared attribute writes were not flagged. It now correctly emits a **`missing-attribute` error** when attempting to write to an attribute not specified in a class's `__slots__`, covering various declaration forms including `dataclass(slots=True)`. This **new capability** is implemented across **`pyrefly/lib/alt/attr.rs`** for external attribute writes and **`pyrefly/lib/alt/class/class_field.rs`** for instance attribute creation. Careful suppression logic is included for scenarios like custom `__setattr__` or unslotted ancestors, ensuring accurate **Python semantics**. This significantly improves the type safety and adherence to Python's `__slots__` behavior within the analyzer.

9 filesgrow
6951b91Mar 2

This commit introduces a **WYSIWYG enhancement** to the **display of generic type arguments**, specifically for types utilizing default type parameters as defined by PEP 696. It **modifies the type rendering logic** within the `pyrefly_types` crate to omit trailing type arguments that match their default values, making displayed types more concise and "as written." A new `TArgs::display_count()` method was added to determine the effective number of arguments to show, impacting `fmt_targs` and other type output mechanisms. This **readability improvement** ensures that users see simplified representations like `Generator[str]` instead of `Generator[str, None, None]`, enhancing the clarity of type information throughout the system.

10 filesgrow
f3fffb3Feb 24

This commit **fixes a false positive `unbound-name` diagnostic** within the **flow analysis** system. Previously, `pyrefly` would incorrectly report a variable as uninitialized when it was assigned in a `try` block and a `NoReturn` function was called in the corresponding `except` block, particularly when this structure was nested inside an `if` statement. The **bug fix** modifies the `FlowStyle::merged()` function to correctly combine `MaybeInitialized` states and preserve termination keys, ensuring that `NoReturn` paths are properly recognized as always exiting. This **improves the accuracy of type checking** by preventing erroneous `unbound-name` errors in these specific control flow scenarios.

2 fileswaste
6c5415fJan 23

This commit **fixes a bug** in `pyrefly`'s **type inference engine** where functions returning `TypeIs[T]` or `TypeGuard[T]` were incorrectly inferred to return their specific `TypeIs` or `TypeGuard` type instead of `bool`. The **type inference logic** within `expr_call_infer` in `pyrefly/lib/alt/call.rs` is updated to correctly convert these special types to `bool` when determining the return type of a call. This ensures that the **type checker** accurately processes the return values of such functions, improving the reliability of **type analysis** and **narrowing logic** for user code. New **test cases** were added to validate this correction.

3 filesmaint
a557539Jan 22

This commit introduces a **new capability** to display **type variable bounds, constraints, and default values** within `forall` types, significantly improving the precision of **type introspection and diagnostics**. It enhances the **`pyrefly_types` crate**'s formatting logic, specifically in `crates/pyrefly_types/src/types.rs`, ensuring that `reveal_type` now provides a complete and unambiguous representation of generic function signatures. This **fixes a long-standing issue** where critical type variable restrictions were previously omitted, leading to clearer understanding for users. The change impacts how generic types are presented in diagnostic output, making it easier to differentiate functions with similar but distinct type variable definitions.

6 filesmaint
d24d086Jan 14

This commit **fixes and enhances type narrowing for sequence patterns** within `match/case` statements, addressing issues where union types were not correctly filtered and captured variables were improperly typed. It introduces the `Sequence` type to the standard library and implements `IsSequence`/`IsNotSequence` operations to ensure the **type checker** accurately narrows types and correctly infers `list[T]` for star-captured variables like `*values`. This **bug fix and feature enhancement** significantly improves the **precision of type inference** for pattern matching, while also adhering to PEP 634 by explicitly excluding `str`, `bytes`, and `bytearray` from sequence pattern matching.

6 filesgrow
6bef521Jan 10

This commit delivers a **bug fix** for the **PyRefly type solver** to ensure correct `TypeVar` resolution order within **union type aliases**. Previously, `TypeVar`s were collected and ordered incorrectly due to alphabetical sorting of union members, leading to misassigned type parameters during **type inference** for constructs like `Result[T, TE]`. The core change in `pyrefly/lib/alt/solve.rs` modifies the `tvars_to_tparams_for_type_alias` function to store and sort `TypeVar`s by their source location, preserving the user's intended order. This rectifies a critical issue in **type checking** for complex type aliases, preventing subtle but significant type mismatches. New test cases in `pyrefly/lib/test/type_alias.rs` validate the corrected behavior across various scenarios.

2 fileswaste
e7fc1fdJan 8

This commit **fixes an incorrect "unreachable" warning** in the **`pyrefly` static analyzer** related to **`for-else` statements**. Previously, the `else` clause was erroneously flagged as unreachable when the loop's iterable might be empty, even if the loop body itself always terminated. The **bug fix** corrects the control flow analysis logic within `pyrefly/lib/binding/scope.rs` to accurately determine branch reachability for these constructs. This change prevents false positive warnings, improving the analyzer's precision and developer experience. New test cases in `pyrefly/lib/test/flow_looping.rs` validate the correct reachability analysis for various `for-else` scenarios.

2 fileswaste
d8dc4ceJan 7

This commit **introduces a new metadata file**, `stubs_metadata.json`, within the `crates/pyrefly_bundled/third_party/` directory. This file serves as a central repository for documenting crucial source information about non-Typeshed stub packages bundled in the project. It includes details such as source repository URLs, PyPI links, license, author information, and bundling dates for these external stubs. This **new capability** significantly improves the project's ability to track and manage its **third-party stub dependencies**, enhancing transparency and maintainability for the `pyrefly_bundled` module.

1 filesgrow
e4bf8eeOct 23

This commit introduces a **feature enhancement** to **Pyrefly's type checker**, specifically improving **overload resolution error messages**. The `pyrefly/lib/alt/overload.rs` module is updated to display the actual argument types provided in a function call when no matching overload is found. This **resolves a usability issue** by providing clearer diagnostics, allowing users to immediately understand why an overload call failed without further investigation. Conformance tests in `conformance/third_party/conformance.exp` and new unit tests in `pyrefly/lib/test/overload.rs` validate this improved error reporting.

4 filesgrow
3e8787bOct 20

This commit introduces a **new feature** to the **Language Server Protocol (LSP) hover functionality** within `pyrefly`, allowing users to inspect suppressed errors. Specifically, hovering over `# pyrefly: ignore` or `# type: ignore` comments will now display the diagnostics that are being ignored. This enhancement improves developer feedback by making hidden issues more discoverable, leveraging new utility functions in `crates/pyrefly_python/src/ignore.rs` for comment parsing and suppression retrieval. The change directly addresses user experience by providing immediate context for ignored code, making `pyrefly` more transparent and user-friendly.

3 filesgrow
2f35751Oct 6

This commit introduces **support for `LiteralString`** within the type checker's handling of `format()`, `join()`, and `replace()` methods. It **enhances the type inference system** by modifying attribute lookup in `pyrefly/lib/alt/attr.rs` to bind these methods to `Type::LiteralString` and utilize overload selection. A new `LiteralString` variant is added to `InstanceKind` in `pyrefly/lib/alt/class/class_field.rs` to correctly represent and manage attributes for these instances. This **new capability** ensures more accurate type checking and completion for string operations involving `LiteralString` types, aligning the type checker with the Python typing specification.

3 filesgrow
a24d67bOct 4

This commit introduces a **new capability** to `pyrefly` by preventing the direct instantiation of **abstract classes**, aligning its behavior with Python's Abstract Base Classes (ABCs). It enhances the **runtime correctness** of the `pyrefly` interpreter by implementing checks within the `call_function` logic in `pyrefly/lib/alt/call.rs`. To support this, **class metadata** (`pyrefly/lib/alt/class/class_metadata.rs`) now stores information about abstract classes and their members, and `ClassField` (`pyrefly/lib/alt/class/class_field.rs`) tracks abstractness. This ensures that attempts to instantiate an abstract class will now correctly raise a `Bad Instantation Error`, providing clear feedback about the unfulfilled abstract members. New **conformance tests** have been added to validate this behavior.

11 filesgrow
b1b3ff0Aug 8

This commit introduces a **new capability** to the **Pyrefly sandbox**, enabling users to select a specific Python version (3.8-3.12) for code execution and type checking. It adds a **Python version selector dropdown** to the `Sandbox` UI, integrates this selection through the `pyrefly_wasm` layer, and updates the underlying `Playground` Rust logic to initialize with the chosen version. This enhancement allows users to easily observe how type checking behavior differs across various Python environments directly within the sandbox.

6 filesgrow
75fa044Jun 20

This commit **fixes** a compliance issue in the **Pyrefly type checker** by enforcing that only the `total` keyword is valid when defining a `TypedDict`, aligning with PEP 589. Previously, invalid keywords were silently ignored, but now the system will raise a new `BadTypedDict` error. This **enhancement** to the **error reporting system** involves modifying the `infer_class_def` function in `pyrefly/lib/alt/class/class_metadata.rs` to validate `TypedDict` arguments. New **conformance tests** and **documentation** for the `bad-typed-dict` error are also included. This change improves the accuracy and user feedback of the **type checker** by providing explicit errors for non-compliant `TypedDict` definitions.

7 fileswaste
f32c44eJun 16

This commit provides a **bug fix** and **refactoring** for **dataclass handling** within the `pyrefly` project, specifically addressing issue #409. It **corrects the behavior of `InitVar` fields**, ensuring they are no longer erroneously treated as instance attributes, which aligns with Python's `dataclasses` module specification. The change introduces `is_init_var` methods in `ClassField` and `Annotation` and updates various methods in `pyrefly/lib/alt/class` to prevent access to `InitVar` fields as instance attributes. This impacts how dataclass members are resolved, synthesized, and iterated, preventing incorrect attribute access and improving the accuracy of type resolution for dataclasses.

8 fileswaste
0e1e39cJun 3

This commit **refactors** the **file discovery logic** to move dotfile exclusion from the configurable `project_excludes` list to the core globbing mechanism. Specifically, the `pyrefly_util/src/globs.rs` module now includes a `should_include_file` function to inherently filter out dotfiles and non-Python files, which is then used by `resolve_path`. This change ensures that **dotfiles are always ignored** during file scanning, making the system more robust and preventing them from being processed even if `project_excludes` is overridden. The `default_project_excludes` in `pyrefly/lib/config/config.rs` is updated to reflect this core exclusion. This **maintenance** improvement enhances the reliability of file processing by embedding a fundamental Python import rule directly into the globbing utility.

2 filesmaint
94a8c2dMay 30

This commit **fixes a bug** in the **dataclass type checking** logic within `pyrefly` where constructors incorrectly expected `InitVar[T]` arguments instead of the specified inner type `T`, violating PEP 557. The `ClassField::as_param()` method was updated to correctly detect `InitVar` types and extract their inner type for constructor parameter qualification. This **bug fix** resolves incorrect type errors for dataclasses utilizing `InitVar` fields, ensuring that `Data("value")` works correctly for `mode: InitVar[str]`. The change significantly improves the **type checker's accuracy** for Python dataclass definitions and is verified by new conformance tests.

5 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